vlc | branch: master | Julian Scheel <[email protected]> | Wed Jun  3 09:50:28 
2015 +0200| [45a463bf2c46099d88e77de8cb98cbc2b11fd5b0] | committer: 
Jean-Baptiste Kempf

mmal/codec: Clear data from buffer header before release

The data attached to the output port headers is not owned by the codec but by
the vout and only temporarily attached to the codecs buffers. To avoid
refcount issues within the mmal core clear the data field before releasing the
buffers.

Signed-off-by: Julian Scheel <[email protected]>
Signed-off-by: Jean-Baptiste Kempf <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=45a463bf2c46099d88e77de8cb98cbc2b11fd5b0
---

 modules/hw/mmal/codec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index 6dd6e1a..dfe916a 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -460,6 +460,7 @@ static int send_output_buffer(decoder_t *dec)
 err:
     if (picture)
         picture_Release(picture);
+    buffer->data = NULL;
     mmal_buffer_header_release(buffer);
     return ret;
 }
@@ -549,6 +550,7 @@ static picture_t *decode(decoder_t *dec, block_t **pblock)
             ret->b_progressive = sys->b_progressive;
             ret->b_top_field_first = sys->b_top_field_first;
 
+            buffer->data = NULL;
             mmal_buffer_header_reset(buffer);
             mmal_buffer_header_release(buffer);
         }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to