[FFmpeg-devel] [PATCH] lavc: Fix ticket 6024 (v2)

wm4 nfxjfg at googlemail.com
Thu Dec 15 18:58:09 EET 2016


On Thu, 15 Dec 2016 09:49:36 -0700
pkoshevoy at gmail.com wrote:

> From: Pavel Koshevoy <pkoshevoy at gmail.com>
> 
> ---
>  libavcodec/utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index 44ecc09..be50459 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -2788,7 +2788,7 @@ static int do_decode(AVCodecContext *avctx, AVPacket *pkt)
>      if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
>          ret = avcodec_decode_video2(avctx, avctx->internal->buffer_frame,
>                                      &got_frame, pkt);
> -        if (ret >= 0)
> +        if (ret >= 0 && !(avctx->flags & AV_CODEC_FLAG_TRUNCATED))
>              ret = pkt->size;
>      } else if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
>          ret = avcodec_decode_audio4(avctx, avctx->internal->buffer_frame,

Still lacks commit message.


More information about the ffmpeg-devel mailing list