[FFmpeg-devel] [PATCH] libavcodec/qsvdec.c: Restoring decoding functionality after unsuccessful merge from libav.
sw at jkqxz.net
Fri Jul 15 13:37:54 EEST 2016
On 15/07/16 07:15, Chao Liu wrote:
> Ivan Uskov <ivan.uskov <at> nablet.com> writes:
>> Hello All,
>> After commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e qsv-based
>> aborts with crash, there are many incorrect places appeared. The
>> patch fixes the issues but keeps new method of the 'sync' variable
>> introduced in commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e.
>> Please review.
> I had the same crashes. After reading the code, you are certainly right.
> Why nobody review this commit?
Presumably noone was particularly interested at the time, and the submitter did
not pursue it.
Looking at it now, the change looks mostly ok to me. The error paths could
maybe be cleaned up a bit, but I think that's mostly a preexisting problem. Can
we loop without *sync being set? If so, removing the av_freep(&sync); inside
the loop makes it leak in that case.
A slightly clearer commit message might help too. Maybe something like:
lavc/qsvdec: Fix decoding following incorrect merge
Decoding was broken by d30cf57a7b2097b565db02ecfffbdc9c16423d0e - the
merge didn't properly handle the sync pointers, so it always
segfaulted after submitting a frame to libmfx.
More information about the ffmpeg-devel