Set keyframe flag only when it is a keyframe. This will break quite some formats because many encoders dont set this ...

Original commit message from CVS:
Set keyframe flag only when it is a keyframe. This will break quite some formats because many encoders dont set this flag correctly, but I'll fix that as I encounter them. divx5 works correctly now. ;).
This commit is contained in:
Ronald S. Bultje 2003-09-30 21:06:43 +00:00
parent 5d09662e9e
commit 51e244fe4a

View file

@ -1257,9 +1257,12 @@ gst_avimux_do_video_buffer (GstAviMux *avimux)
}
else
{
guint flags = 0x2;
if (GST_BUFFER_FLAG_IS_SET (data, GST_BUFFER_KEY_UNIT))
flags |= 0x10;
avimux->data_size += total_size;
avimux->num_frames++;
gst_avimux_add_index(avimux, "00db", 0x12, GST_BUFFER_SIZE(data));
gst_avimux_add_index(avimux, "00db", flags, GST_BUFFER_SIZE(data));
}
gst_pad_push(avimux->srcpad, header);