[FFmpeg-devel] [PATCH] Fix a bug in ff_thread_report_progress in updating progress[field].
Wan-Teh Chang
wtc at google.com
Tue Mar 1 15:34:00 CET 2016
On Mon, Feb 29, 2016 at 7:00 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>
> Do you have a sample+commandline to reproduce? The thing is, in all cases
> where we use this, only one thread writes to a specific progress[n]. Two
> threads may write to progress[], one per field, but one will write to
> progress[0] and the other to progress[1]. If this happens, I don't mind the
> patch, but I'd like to know how exactly this happens (also for posterity
> documentation purposes).
Dmitry Vyukov found this issue by code inspection. We understand this
is a bug only if two threads may call ff_thread_report_progress, on
the same progress[field] value (which I didn't state in my original
report), at the same time. I thought we should report the issue here
to get your opinion.
You can reject this patch, or accept the patch to make it easier to
reason about the correctness of the code.
By the way, I'm also wondering why ff_thread_report_progress is
sometimes called with progress[field] >= n? I saw it happen when I ran
make fate-h264, but did not investigate it.
Thanks,
Wan-Teh Chang
More information about the ffmpeg-devel
mailing list