Hi,

On Fri, Mar 16, 2012 at 10:36 AM, Janne Grunau <[email protected]> wrote:
> If the dummy frame are not created from a reference frame they could
> be deleted untimely resulting in multithreaded decoder waiting on
> the current frame to finish.
> Noticed by Ronald S. Bultje in the RV34 decoder with a broken file.
> ---
>  libavcodec/mpegvideo.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
> index 8be596b..f1e11cd 100644
> --- a/libavcodec/mpegvideo.c
> +++ b/libavcodec/mpegvideo.c
> @@ -1271,6 +1271,7 @@ int ff_MPV_frame_start(MpegEncContext *s, 
> AVCodecContext *avctx)
>                 return -1;
>             ff_thread_report_progress(&s->last_picture_ptr->f, INT_MAX, 0);
>             ff_thread_report_progress(&s->last_picture_ptr->f, INT_MAX, 1);
> +            s->last_picture_ptr->f.reference = 3;
>         }
>         if ((s->next_picture_ptr == NULL ||
>              s->next_picture_ptr->f.data[0] == NULL) &&
> @@ -1282,6 +1283,7 @@ int ff_MPV_frame_start(MpegEncContext *s, 
> AVCodecContext *avctx)
>                 return -1;
>             ff_thread_report_progress(&s->next_picture_ptr->f, INT_MAX, 0);
>             ff_thread_report_progress(&s->next_picture_ptr->f, INT_MAX, 1);
> +            s->next_picture_ptr->f.reference = 3;
>         }
>     }

OK.

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

Reply via email to