From: <mat...@fr...> - 2004-12-28 16:40:08
|
CVS Root: /cvs/gstreamer Module: gst-plugins Changes by: mathrick Date: Tue Dec 28 2004 08:40:00 PST Log message: Fix Vorbis streams failing to decode in some files, where cluster_time isn't 0, because then it doesn't send codec_priv before actual data. Modified files: gst/matroska : matroska-demux.c matroska-demux.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/matroska/matroska-demux.c.diff?r1=1.42&r2=1.43 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/matroska/matroska-demux.h.diff?r1=1.6&r2=1.7 ====Begin Diffs==== Index: matroska-demux.c =================================================================== RCS file: /cvs/gstreamer/gst-plugins/gst/matroska/matroska-demux.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- matroska-demux.c 23 Dec 2004 13:14:24 -0000 1.42 +++ matroska-demux.c 28 Dec 2004 16:39:48 -0000 1.43 @@ -849,6 +849,7 @@ caps = gst_matroska_demux_audio_caps (audiocontext, context->codec_id, context->codec_priv, context->codec_priv_size, demux); + audiocontext->first_frame = TRUE; break; } @@ -1890,8 +1891,10 @@ break; } - if ((cluster_time + time == 0) && - (!strcmp (demux->src[stream]->codec_id, + if (((cluster_time + time == 0) || + ((GstMatroskaTrackAudioContext *) demux->src[stream])-> + first_frame) + && (!strcmp (demux->src[stream]->codec_id, GST_MATROSKA_CODEC_ID_AUDIO_VORBIS))) { /* start of the stream and vorbis audio, need to send the codec_priv * data as first three packets */ @@ -1900,6 +1903,8 @@ gint i; GstBuffer *priv; + ((GstMatroskaTrackAudioContext *) demux->src[stream])->first_frame = + FALSE; p = (unsigned char *) demux->src[stream]->codec_priv; offset = 3; for (i = 0; i < 2; i++) { Index: matroska-demux.h RCS file: /cvs/gstreamer/gst-plugins/gst/matroska/matroska-demux.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- matroska-demux.h 16 Apr 2004 01:20:44 -0000 1.6 +++ matroska-demux.h 28 Dec 2004 16:39:48 -0000 1.7 @@ -88,8 +88,7 @@ guint64 time_scale; /* length, position (time, ns) */ - guint64 duration, - pos; + guint64 duration, pos; /* a possible pending seek */ guint64 seek_pending; |