[FFmpeg-devel] [PATCH] lavc/videotoolbox: validate vt context in the decoder callback

"zhilizhao(赵志立)" quinkblack at foxmail.com
Tue Dec 6 07:19:25 EET 2022



> On Dec 5, 2022, at 21:36, Rick Kern <kernrj at gmail.com> wrote:
> 
> On Sun, Dec 4, 2022 at 12:51 PM Alessandro Di Nepi <
> alessandro.dinepi at gmail.com> wrote:
> 
>> On 4 Dec 2022, 17:01 +0200, FFmpeg development discussions and patches <
>> ffmpeg-devel at ffmpeg.org>, wrote:
>>> When this happens, does it continue happening, or is it transient? My
>> main
>>> concern is log spamming.
>> Good question: this is just a transient state, so that it won't continue
>> happening.
>> To give you some context: when the decoding start, the value of `vtctx` is
>> captured "too" early so that the first time the callback is called, it's
>> still NULL.
>> The next time it will have a proper value.
>> 
> If the code isn't setting a variable in time, that issue should be fixed.
> Otherwise the decoder will drop frames.

Yes, null pointer check doesn’t looks like a resolution to a race
condition. I’m not sure how the race condition happened in the first
place.

> 
> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> 
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list