? config.status.lineno
? gst/audioconvert/.audioconvert.c.swp
Index: gst/audioconvert/audioconvert.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst/audioconvert/audioconvert.c,v
retrieving revision 1.16
diff -u -p -r1.16 audioconvert.c
--- gst/audioconvert/audioconvert.c	28 Feb 2007 12:08:27 -0000	1.16
+++ gst/audioconvert/audioconvert.c	19 Mar 2007 11:28:24 -0000
@@ -129,7 +129,12 @@ MAKE_PACK_FUNC_NAME (name) (gint32 *src,
   guint8 *p = (guint8 *)dst;                                            \
   guint32 tmp;                                                          \
   for (;count; count--) {                                               \
-    tmp = (*src++ ^ (sign)) >> scale;                                   \
+    tmp = *src++;                                                       \
+    if (scale > 0 && tmp > 0 && G_MAXINT32 - tmp < (1<<(scale-1)))      \
+      tmp = G_MAXINT32;                                                 \
+    else if (scale > 0)                                                 \
+      tmp += 1<<(scale-1);                                              \
+    tmp = (tmp ^ (sign)) >> scale;                                      \
     WRITE_FUNC (p, tmp);                                                \
     p+=stride;                                                          \
   }                                                                     \
