GNOME Bugzilla – Bug 340859
[avimux] produces index with all frames marked as keyframes
Last modified: 2006-05-09 14:08:57 UTC
A buffer to be sent out is (properly) stripped using (a.o.) gst_buffer_make_metadata_writable, but this also clears the buffer flags in the resulting sub-buffer. [Because there is more than one ref on the buffer; one in gst_avi_mux_do_video_buffer and a peek one in gst_avi_mux_do_one_buffer] So, the buffer looks like holding keyframe at the point in code checking for this.
Created attachment 64938 [details] [review] Possible patch Patches this problem by only preparing ('stripping') a buffer (just) prior to pushing it out, so that other inspection of the buffer (for e.g. flags) is unaffected.
Oops, nice catch. I think this is actually a bug in gst_buffer_make_metadata_writable() - fixed in core CVS now: 2006-05-09 Tim-Philipp Müller <tim at centricular dot net> * gst/gstbuffer.c: (gst_buffer_make_metadata_writable): gst_buffer_make_metadata_writable() should maintain the buffer flags (those that make sense at least) (see #340859). and committed to -good CVS as well: 2006-05-09 Tim-Philipp Müller <tim at centricular dot net> Patch by: Mark Nauwelaerts <manauw at skynet bet> * gst/avi/gstavimux.c: (gst_avi_mux_do_audio_buffer), (gst_avi_mux_do_video_buffer): Work around gst_buffer_make_metadata_writable() bug that results in avimux marking all frames in the index as keyframes (#340859).