Commit 61057399 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: small code factorization

parent 9cd84c84
...@@ -707,8 +707,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) ...@@ -707,8 +707,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
if( b_drawpicture ) if( b_drawpicture )
msg_Warn( p_dec, "cannot decode one frame (%zu bytes)", msg_Warn( p_dec, "cannot decode one frame (%zu bytes)",
p_block->i_buffer ); p_block->i_buffer );
block_Release( p_block ); break;
return NULL;
} }
else if( (unsigned)i_used > p_block->i_buffer || else if( (unsigned)i_used > p_block->i_buffer ||
p_context->thread_count > 1 ) p_context->thread_count > 1 )
...@@ -799,9 +798,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) ...@@ -799,9 +798,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
if( !p_pic ) if( !p_pic )
{ {
av_frame_unref(frame); av_frame_unref(frame);
if( p_block ) break;
block_Release( p_block );
return NULL;
} }
/* Fill picture_t from AVFrame */ /* Fill picture_t from AVFrame */
......
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