0002-clear_DISCONT_flag.patch 1.1 KB

12345678910111213141516171819202122232425262728
  1. From 6f707fcbca2c60aed565247567bafdd168980161 Mon Sep 17 00:00:00 2001
  2. From: Tim-Philipp Müller <tim.muller@collabora.co.uk>
  3. Date: Sat, 03 Mar 2012 13:04:48 +0000
  4. Subject: v4l2: clear DISCONT flag when recycling buffers into the buffer pool
  5. The base class may have set the DISCONT flag on the first buffer pushed
  6. out. We need to clear that when recycling buffers back into the buffer
  7. pool, otherwise we constantly push out buffers with the discont flag
  8. set, which might upset downstream elements, esp. for compressed
  9. formats like mpeg-ts.
  10. ---
  11. (limited to 'sys/v4l2')
  12. diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
  13. index 51419ff..a0b4c84 100644
  14. --- a/sys/v4l2/gstv4l2bufferpool.c
  15. +++ b/sys/v4l2/gstv4l2bufferpool.c
  16. @@ -98,6 +98,7 @@ gst_v4l2_buffer_finalize (GstV4l2Buffer * buffer)
  17. GST_LOG_OBJECT (pool->v4l2elem, "reviving buffer %p, %d", buffer, index);
  18. gst_buffer_ref (GST_BUFFER (buffer));
  19. GST_BUFFER_SIZE (buffer) = 0;
  20. + GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
  21. pool->buffers[index] = buffer;
  22. }
  23. --
  24. cgit v0.9.0.2-2-gbebe