+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),
default:
break;
}
- ffmpegdec->waiting_for_key = TRUE;
ffmpegdec->next_ts = 0;
return TRUE;
}
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 */
}
GstCaps *caps;
gint num;
gchar *padname;
+ const gchar *codec;
switch (stream->codec.codec_type) {
case CODEC_TYPE_VIDEO:
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;
}