[vlc-devel] [PATCH 8/9] avcodec: video: remove i_used variable as send_packet consumes all
Thomas Guillem
thomas at gllm.fr
Sun Sep 4 15:21:32 CEST 2016
On Sun, Sep 4, 2016, at 14:34, ileoo at videolan.org wrote:
> From: Ilkka Ollakka <ileoo at videolan.org>
>
> ---
> 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 83bb454..b59e7fa 100644
> --- a/modules/codec/avcodec/video.c
> +++ b/modules/codec/avcodec/video.c
> @@ -855,23 +855,9 @@ static picture_t *DecodeVideo( decoder_t *p_dec,
> block_t **pp_block )
> if( p_block->i_buffer <= 0 )
> p_sys->b_flush = 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;
Shouldn't you set pp_block to NULL instead ?
> }
>
> /* Nothing to display */
> --
> 2.6.6
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list