[vlc-commits] avcodec: video: remove i_used variable as send_packet consumes all
Ilkka Ollakka
git at videolan.org
Wed Sep 7 11:16:45 CEST 2016
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Sep 4 11:59:10 2016 +0300| [d50f79efbd0fc832f83f481d4bfa62eb13440b8a] | committer: Ilkka Ollakka
avcodec: video: remove i_used variable as send_packet consumes all
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d50f79efbd0fc832f83f481d4bfa62eb13440b8a
---
modules/codec/avcodec/video.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index d07ae5d..324591c 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -854,23 +854,9 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
if( p_block->i_buffer <= 0 )
eos_spotted = false;
- if( i_used < 0 )
- {
- av_frame_free(&frame);
- if( b_need_output_picture )
- msg_Warn( p_dec, "cannot decode one frame (%zu bytes)",
- p_block->i_buffer );
- break;
- }
- else if( (unsigned)i_used > p_block->i_buffer ||
- p_context->thread_count > 1 )
- {
- i_used = p_block->i_buffer;
- }
-
/* Consumed bytes */
- p_block->i_buffer -= i_used;
- p_block->p_buffer += i_used;
+ p_block->p_buffer += p_block->i_buffer;
+ p_block->i_buffer = 0;
}
/* Nothing to display */
More information about the vlc-commits
mailing list