On Mon, 20 Jan 2014 11:25:41 +0100, Luca Barbato <[email protected]> wrote:
> Sample-Id: 00001533-google
> Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> CC: [email protected]
> ---
>  libavcodec/hevc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
> index c33de8e..5d520fa 100644
> --- a/libavcodec/hevc.c
> +++ b/libavcodec/hevc.c
> @@ -2606,6 +2606,12 @@ static int decode_nal_unit(HEVCContext *s, const 
> uint8_t *nal, int length)
>              }
>          }
>  
> +        if (s->sh.slice_type != I_SLICE && !s->ref->refPicList) {
> +            av_log(s->avctx, AV_LOG_WARNING,
> +                  "The reference lists for the current slice is missing.\n");
> +            return AVERROR_INVALIDDATA;
> +        }
> +

I do not think this is the correct fix.

refPicList is set when the per-slice reference list is constructed. That is done
right above, the difference from your check is that it's only called for the
first slice segment.

So I suspect the problem could be that due to some insufficient checking in the
slice header reading we jump directly to the dependent slice segment without
first reading the corresponding independent one.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to