caps = gst_matroska_demux_audio_caps (audiocontext,
context->codec_id,
context->codec_priv, context->codec_priv_size, demux);
+ audiocontext->first_frame = TRUE;
break;
}
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 */
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++) {