summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej Katafiasz <mathrick@mathrick.org>2004-12-28 16:39:48 +0000
committerMaciej Katafiasz <mathrick@mathrick.org>2004-12-28 16:39:48 +0000
commite857c88844bc8be2ac6344feca4969054b3f013a (patch)
tree3cd273b3bdd84e95e911da3a74058d0ed11a962a
parentcf81f02e10b280505bb883bbda735a6f59b0bead (diff)
Fix Vorbis streams failing to decode in some files, where cluster_time isn't 0, because then it doesn't send codec_pr...
Original commit message from CVS: 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.
-rw-r--r--gst/matroska/matroska-demux.c9
-rw-r--r--gst/matroska/matroska-demux.h3
2 files changed, 8 insertions, 4 deletions
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index ed243e7a..7ba846bd 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -849,6 +849,7 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux)
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 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux * demux,
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 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux * demux,
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++) {
diff --git a/gst/matroska/matroska-demux.h b/gst/matroska/matroska-demux.h
index 95a27020..9e21a890 100644
--- a/gst/matroska/matroska-demux.h
+++ b/gst/matroska/matroska-demux.h
@@ -88,8 +88,7 @@ typedef struct _GstMatroskaDemux {
guint64 time_scale;
/* length, position (time, ns) */
- guint64 duration,
- pos;
+ guint64 duration, pos;
/* a possible pending seek */
guint64 seek_pending;