On Thu, Apr 9, 2015 at 6:25 PM, Himangi Saraogi <[email protected]> wrote:
> ---
> This fixes CID 1163846.

Feel free to add this in the commit log, usually we tag it with "Bug-Id:"

>  libavcodec/h264.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> index 46c172a..add0c4c 100644
> --- a/libavcodec/h264.c
> +++ b/libavcodec/h264.c
> @@ -1730,7 +1730,7 @@ out:
>
>      if (!(avctx->flags2 & CODEC_FLAG2_CHUNKS) ||
>          (h->mb_y >= h->mb_height && h->mb_height)) {
> -        if (avctx->flags2 & CODEC_FLAG2_CHUNKS)
> +        if ((avctx->flags2 & CODEC_FLAG2_CHUNKS) && h->cur_pic_ptr)
>              decode_postinit(h, 1);
>
>          ff_h264_field_end(h, &h->slice_ctx[0], 0);

While this fixes the CID, are you sure that h->cur_pic_ptr being null
is something legit? In other words, should this error out when
CODEC_FLAG2_CHUNKS and cur_pic_ptr is null?
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to