Commit 59e8639b authored by Thomas Guillem's avatar Thomas Guillem

avcodec: handle NULL pp_block

Drain when pp_block is NULL.
parent 4fe75d52
......@@ -530,9 +530,6 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
int b_drawpicture;
block_t *p_block;
if( !pp_block )
return NULL;
if( !p_context->extradata_size && p_dec->fmt_in.i_extra )
{
ffmpeg_InitCodec( p_dec );
......@@ -540,7 +537,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
OpenVideoCodec( p_dec );
}
p_block = *pp_block;
p_block = pp_block ? *pp_block : NULL;
if(!p_block && !(p_sys->p_codec->capabilities & CODEC_CAP_DELAY) )
return NULL;
......
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