From: Ronald S. B. <rb...@pd...> - 2004-03-07 02:17:38
|
CVS Root: /home/cvs/gstreamer Module: gst-plugins Changes by: rbultje Date: Sat Mar 06 2004 18:09:57 PST Log message: * sys/oss/gstosssink.c: (gst_osssink_get_delay), (gst_osssink_get_time): get_delay() may return values lower than 0. In those cases, we should not actually cast to *unsigned* int64, that will break stuff horribly. In my case, it screwed up A/V sync in movies in totem rather badly. Modified files: . : ChangeLog sys/oss : gstosssink.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.389&r2=1.390 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/sys/oss/gstosssink.c.diff?r1=1.85&r2=1.86 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.389 retrieving revision 1.390 diff -u -d -r1.389 -r1.390 --- a/ChangeLog 6 Mar 2004 20:56:26 -0000 1.389 +++ b/ChangeLog 7 Mar 2004 02:09:45 -0000 1.390 @@ -1,3 +1,12 @@ +2004-03-06 Ronald Bultje <rb...@ro...> + + * sys/oss/gstosssink.c: (gst_osssink_get_delay), + (gst_osssink_get_time): + get_delay() may return values lower than 0. In those cases, we + should not actually cast to *unsigned* int64, that will break + stuff horribly. In my case, it screwed up A/V sync in movies + in totem rather badly. 2004-03-06 Christophe Fergeau <te...@gn...> * ext/faac/gstfaac.c: (gst_faac_chain): Index: gstosssink.c RCS file: /home/cvs/gstreamer/gst-plugins/sys/oss/gstosssink.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- a/gstosssink.c 27 Feb 2004 23:36:43 -0000 1.85 +++ b/gstosssink.c 7 Mar 2004 02:09:45 -0000 1.86 @@ -257,7 +257,7 @@ return GST_PAD_LINK_OK; } -static inline gint64 +static inline gint gst_osssink_get_delay (GstOssSink *osssink) { gint delay = 0; @@ -280,6 +280,7 @@ delay = (info.fragstotal * info.fragsize) - info.bytes; } } return delay; @@ -298,7 +299,9 @@ /* sometimes delay is bigger than the number of bytes sent to the device, * which screws up this calculation, we assume that everything is still * in the device then */ - if (((guint64)delay) > osssink->handled) { + if (delay < 0) { + delay = 0; + } else if (((guint64) delay) > osssink->handled) { delay = osssink->handled; res = (osssink->handled - delay) * GST_SECOND / GST_OSSELEMENT (osssink)->bps; |