[vlc-commits] avcodec: small code factorization
Rémi Denis-Courmont
git at videolan.org
Wed Apr 22 20:46:12 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 22 21:13:28 2015 +0300| [610573999aee4275f5a6adff2d15ca8011c9a03e] | committer: Rémi Denis-Courmont
avcodec: small code factorization
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=610573999aee4275f5a6adff2d15ca8011c9a03e
---
modules/codec/avcodec/video.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index e34819d..5c76ab0 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -707,8 +707,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
if( b_drawpicture )
msg_Warn( p_dec, "cannot decode one frame (%zu bytes)",
p_block->i_buffer );
- block_Release( p_block );
- return NULL;
+ break;
}
else if( (unsigned)i_used > p_block->i_buffer ||
p_context->thread_count > 1 )
@@ -799,9 +798,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
if( !p_pic )
{
av_frame_unref(frame);
- if( p_block )
- block_Release( p_block );
- return NULL;
+ break;
}
/* Fill picture_t from AVFrame */
More information about the vlc-commits
mailing list