avfvideosrc: fix setting of buffer offset end
authorIlya Konstantinov <ilya.konstantinov@gmail.com>
Sun, 5 Apr 2015 02:37:09 +0000 (05:37 +0300)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 7 Apr 2015 11:57:44 +0000 (12:57 +0100)
Don't set offset end to random values off the stack.

https://bugzilla.gnome.org/show_bug.cgi?id=747352

sys/applemedia/avfvideosrc.m

index f04a977..19b6e55 100644 (file)
@@ -918,7 +918,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
     *buf = gst_core_video_texture_cache_get_gl_buffer (textureCache, *buf);
 
   GST_BUFFER_OFFSET (*buf) = offset++;
-  GST_BUFFER_OFFSET_END (*buf) = GST_BUFFER_OFFSET (buf) + 1;
+  GST_BUFFER_OFFSET_END (*buf) = GST_BUFFER_OFFSET (*buf) + 1;
   GST_BUFFER_TIMESTAMP (*buf) = timestamp;
   GST_BUFFER_DURATION (*buf) = duration;