v4l2: set GST_BUFFER_FLAG_DELTA_UNIT when appropriate

https://bugzilla.gnome.org/show_bug.cgi?id=722394
This commit is contained in:
Michael Olbrich 2013-09-12 16:56:56 +02:00 committed by Nicolas Dufresne
parent 3d2bd4ff49
commit 3978f6ae6c

View file

@ -974,6 +974,12 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer)
if (vbuffer.field == V4L2_FIELD_INTERLACED_BT) {
GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF);
}
if (GST_VIDEO_INFO_FORMAT (&obj->info) == GST_VIDEO_FORMAT_ENCODED) {
if (vbuffer.flags & V4L2_BUF_FLAG_KEYFRAME)
GST_BUFFER_FLAG_UNSET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
else
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
}
/* The size can change at every frame, esp. with jpeg. The GstMemory
* inside the GstBuffer could have been changed by some other