On 2013-11-04 18:08:32 +0100, Anton Khirnov wrote:
> Prevents referencing empty frames.

maybe add "when the first packet after the flush does not contain a
frame"

> ---
>  libavcodec/h264.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> index f0ef2eb..5d8406f 100644
> --- a/libavcodec/h264.c
> +++ b/libavcodec/h264.c
> @@ -2768,6 +2768,9 @@ static void flush_dpb(AVCodecContext *avctx)
>      h->parse_context.overread_index    = 0;
>      h->parse_context.index             = 0;
>      h->parse_context.last_index        = 0;
> +
> +    free_tables(h, 1);
> +    h->context_initialized = 0;
>  }
>  
>  int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc)

patch ok

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

Reply via email to