On Tue, Feb 13, 2018 at 12:24:41PM -0800, Xiaohan Wang (王消寒) wrote:
> New patch as discussed offline:
> 
> 
> 
> On Sat, Feb 3, 2018 at 2:29 AM, Xiaohan Wang (王消寒) <xhw...@chromium.org>
> wrote:
> 
> >
> >

>  h264_cavlc.c |    1 +
>  1 file changed, 1 insertion(+)
> a6bff5246e55cd4a75eff5ccaf5c8ecfd20c1cba  
> 0001-ffmpeg-Set-valid-qscale-value-in-ff_h264_decode_mb_c.patch
> From e8ad6159640c913773583a8b551ecebcff6b9c63 Mon Sep 17 00:00:00 2001
> From: Xiaohan Wang <xhw...@chromium.org>
> Date: Sat, 3 Feb 2018 01:43:35 -0800
> Subject: [PATCH] ffmpeg: Set valid qscale value in ff_h264_decode_mb_cavlc()
> 
> When ff_h264_decode_mb_cavlc() failed due to wrong sl->qscale values,
> e.g. dquant out of range, set the qscale to be a valid value before
> returning -1 and exiting the function. The qscale value can be used
> later e.g. in loop filter.
> 
> BUG=806122
> ---
>  libavcodec/h264_cavlc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c
> index 2421beed9d..a7e60676a0 100644
> --- a/libavcodec/h264_cavlc.c
> +++ b/libavcodec/h264_cavlc.c
> @@ -1110,6 +1110,7 @@ decode_intra_mb:
>              else                sl->qscale -= max_qp+1;
>              if (((unsigned)sl->qscale) > max_qp){
>                  av_log(h->avctx, AV_LOG_ERROR, "dquant out of range (%d) at 
> %d %d\n", dquant, sl->mb_x, sl->mb_y);
> +                sl->qscale = max_qp;

will apply

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to