On Mon, 20 Jan 2014 11:25:42 +0100, Luca Barbato <[email protected]> wrote:
> Sample-Id: 00001388-google
> Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> CC: [email protected]
> ---
>  libavcodec/hevc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
> index 5d520fa..bd547cb 100644
> --- a/libavcodec/hevc.c
> +++ b/libavcodec/hevc.c
> @@ -1759,13 +1759,13 @@ static void hls_prediction_unit(HEVCContext *s, int 
> x0, int y0,
>  
>      if (current_mv.pred_flag[0]) {
>          ref0 = refPicList[0].ref[current_mv.ref_idx[0]];
> -        if (!ref0)
> +        if (!ref0 || !ref0->frame->data[0])
>              return;
>          hevc_await_progress(s, ref0, &current_mv.mv[0], y0, nPbH);
>      }
>      if (current_mv.pred_flag[1]) {
>          ref1 = refPicList[1].ref[current_mv.ref_idx[1]];
> -        if (!ref1)
> +        if (!ref1 || !ref1->frame->data[0])

This doesn't look right either, empty frames shouldn't get into the ref list at
all.

So probably some additional checks are needed when the reference list is
constructed (though find_ref_idx should only let valid frames through).

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

Reply via email to