Commit 45a463bf authored by Julian Scheel's avatar Julian Scheel Committed by 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: default avatarJulian Scheel <julian@jusst.de>
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 2698e589
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment