mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 22:48:49 +00:00
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.
This commit is contained in:
parent
cf81f02e10
commit
e857c88844
2 changed files with 8 additions and 4 deletions
|
@ -849,6 +849,7 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux)
|
||||||
caps = gst_matroska_demux_audio_caps (audiocontext,
|
caps = gst_matroska_demux_audio_caps (audiocontext,
|
||||||
context->codec_id,
|
context->codec_id,
|
||||||
context->codec_priv, context->codec_priv_size, demux);
|
context->codec_priv, context->codec_priv_size, demux);
|
||||||
|
audiocontext->first_frame = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1890,8 +1891,10 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux * demux,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((cluster_time + time == 0) &&
|
if (((cluster_time + time == 0) ||
|
||||||
(!strcmp (demux->src[stream]->codec_id,
|
((GstMatroskaTrackAudioContext *) demux->src[stream])->
|
||||||
|
first_frame)
|
||||||
|
&& (!strcmp (demux->src[stream]->codec_id,
|
||||||
GST_MATROSKA_CODEC_ID_AUDIO_VORBIS))) {
|
GST_MATROSKA_CODEC_ID_AUDIO_VORBIS))) {
|
||||||
/* start of the stream and vorbis audio, need to send the codec_priv
|
/* start of the stream and vorbis audio, need to send the codec_priv
|
||||||
* data as first three packets */
|
* data as first three packets */
|
||||||
|
@ -1900,6 +1903,8 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux * demux,
|
||||||
gint i;
|
gint i;
|
||||||
GstBuffer *priv;
|
GstBuffer *priv;
|
||||||
|
|
||||||
|
((GstMatroskaTrackAudioContext *) demux->src[stream])->first_frame =
|
||||||
|
FALSE;
|
||||||
p = (unsigned char *) demux->src[stream]->codec_priv;
|
p = (unsigned char *) demux->src[stream]->codec_priv;
|
||||||
offset = 3;
|
offset = 3;
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
|
|
|
@ -88,8 +88,7 @@ typedef struct _GstMatroskaDemux {
|
||||||
guint64 time_scale;
|
guint64 time_scale;
|
||||||
|
|
||||||
/* length, position (time, ns) */
|
/* length, position (time, ns) */
|
||||||
guint64 duration,
|
guint64 duration, pos;
|
||||||
pos;
|
|
||||||
|
|
||||||
/* a possible pending seek */
|
/* a possible pending seek */
|
||||||
guint64 seek_pending;
|
guint64 seek_pending;
|
||||||
|
|
Loading…
Reference in a new issue