omxil: Release picture in direct rendering mode.
authorJulian Scheel <julian@jusst.de>
Wed, 21 Aug 2013 08:53:41 +0000 (10:53 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 21 Aug 2013 09:18:09 +0000 (11:18 +0200)
In direct rendering mode a picture reference is acquired from the video output
module. This reference has to be released when the internal omx buffer which
uses this reference is freed. This avoids a blocking condition where the video
output would wait for a picture to be freed forever.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/omxil/omxil.c

index c49b7e5..71ee9b0 100644 (file)
@@ -1047,6 +1047,8 @@ static OMX_ERRORTYPE PortReconfigure(decoder_t *p_dec, OmxPort *p_port)
     for(i = 0; i < p_port->i_buffers; i++)
     {
         OMX_FIFO_GET(&p_port->fifo, p_buffer);
+        if (p_buffer->pAppPrivate != NULL)
+            decoder_DeletePicture( p_dec, p_buffer->pAppPrivate );
         if (p_buffer->nFlags & SENTINEL_FLAG) {
             free(p_buffer);
             i--;