GNOME Bugzilla – Bug 393187
ffenc_mpeg4 does not set codec_data on caps
Last modified: 2007-04-12 11:07:05 UTC
For the .mp4 file format, it is mandatory for the codec_data/extradata/header bytes to be stored inside the container. For this to work, ffenc_mpeg4 needs to put them on the caps as codec_data, so that the muxer can store them. The attached patch does this for MPEG4 video and fixes a related problem. Maybe this needs to be exposed as a property because in some containers it is valid to mux the codec header in stream as well.
Created attachment 79456 [details] patch to set codec_data
Created attachment 79482 [details] [review] patch to set global extradata as a property The patch above produces e.g. AVI that e.g. mplayer has difficulties with. This patch contains the same as the previous one (copied from it), but adds the CODEC_FLAG_GLOBAL_HEADER to the exposed flags, and makes it as such configurable as a property (as suggested initially), along with many others (which in the present configuration are only "switched on" for MPEG4-like codecs).
Patch by: Mark Nauwelaerts <manauw at skynet dot be> and Thomas Vander Stichele <thomas at apestaart dot org> * ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_flags_get_type): * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), (gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname): Add the CODEC_FLAG_GLOBAL_HEADER to the exposed flags, and makes it as such configurable as a property. Fixes #393187.