Commit 395ebbdf authored by Ronald S. Bultje's avatar Ronald S. Bultje

ext/ffmpeg/gstffmpegdec.c: Fix breakage of testsuite by adding keyframe...

ext/ffmpeg/gstffmpegdec.c: Fix breakage of testsuite by adding keyframe syncing; changed to sync only for some stream...

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open),
(gst_ffmpegdec_handle_event):
Fix breakage of testsuite by adding keyframe syncing; changed
to sync only for some streamtypes (MPEG-2/-4, for now).
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_add):
Add tags.
parent e65e6b80
2005-04-02 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open),
(gst_ffmpegdec_handle_event):
Fix breakage of testsuite by adding keyframe syncing; changed
to sync only for some streamtypes (MPEG-2/-4, for now).
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_add):
Add tags.
2005-04-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_init),
......
......@@ -415,7 +415,6 @@ gst_ffmpegdec_open (GstFFMpegDec *ffmpegdec)
default:
break;
}
ffmpegdec->waiting_for_key = TRUE;
ffmpegdec->next_ts = 0;
return TRUE;
......@@ -819,7 +818,11 @@ gst_ffmpegdec_handle_event (GstFFMpegDec * ffmpegdec, GstEvent * event)
}
if (ffmpegdec->opened) {
avcodec_flush_buffers (ffmpegdec->context);
ffmpegdec->waiting_for_key = TRUE;
if (ffmpegdec->context->codec_id == CODEC_ID_MPEG2VIDEO ||
ffmpegdec->context->codec_id == CODEC_ID_MPEG4) {
ffmpegdec->waiting_for_key = TRUE;
}
}
/* fall-through */
}
......
......@@ -473,6 +473,7 @@ gst_ffmpegdemux_add (GstFFMpegDemux * demux, AVStream * stream)
GstCaps *caps;
gint num;
gchar *padname;
const gchar *codec;
switch (stream->codec.codec_type) {
case CODEC_TYPE_VIDEO:
......@@ -513,6 +514,16 @@ gst_ffmpegdemux_add (GstFFMpegDemux * demux, AVStream * stream)
gst_element_add_pad (GST_ELEMENT (demux), pad);
/* metadata */
if ((codec = gst_ffmpeg_get_codecid_longname (stream->codec.codec_id))) {
GstTagList *list = gst_tag_list_new ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
(stream->codec.codec_type == CODEC_TYPE_VIDEO) ?
GST_TAG_VIDEO_CODEC : GST_TAG_AUDIO_CODEC, codec, NULL);
gst_element_found_tags_for_pad (GST_ELEMENT (demux), pad, 0, list);
}
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment