Commit a7d96e44 authored by Martin Storsjö's avatar Martin Storsjö Committed by Jean-Baptiste Kempf

omxil: Dequeue output frames even if there's no picture to write them into

Make sure we always remove all output frames from the output
frame queue, even if there's no picture.

This fixes (for most practical cases at least) the issue where
the app could hang repeating "can't get output picture" after
stopping playback with omxil video decoding.

In that case, the vout didn't return any picture to write the
decoded frames into, causing the omxil codec to run out of output
buffers, blocking, and thus running out of input buffers, blocking
the decoder thread while waiting for a free input buffer.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 79bb067a
......@@ -1230,12 +1230,13 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
/* We're not in direct rendering mode.
* Get a new picture and copy the content */
p_pic = decoder_NewPicture( p_dec );
if( !p_pic ) break; /* No picture available */
CopyOmxPicture(p_dec, p_pic, p_header, p_sys->out.definition.format.video.nSliceHeight);
if (p_pic)
CopyOmxPicture(p_dec, p_pic, p_header, p_sys->out.definition.format.video.nSliceHeight);
}
p_pic->date = p_header->nTimeStamp;
if (p_pic)
p_pic->date = p_header->nTimeStamp;
p_header->nFilledLen = 0;
p_header->pAppPrivate = 0;
}
......
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