[Libav-user] Effects of passing contexts (format, codec) between threads

Jake Eastwood cheloveck2.0 at gmail.com
Thu Aug 18 11:53:04 EEST 2022


In our project we successfully created stream context from one thread and
read packets from separated threadpool. It looks like nothing depends on
specific thread.

On Thu, Aug 18, 2022, 14:35 Olzhas Zhumabek <
anonymous.from.applecity at gmail.com> wrote:

> >  With threads you want parallelism not sequential access so to me it
> doesnt make too much sense to have it moved around.
>
> At the moment I have a task scheduling framework that schedules tasks to
> idle threads. The ffmpeg encoding/decoding is thus sliced into tasks and
> those get picked up by idle threads. I just wanted to know if I need to
> have a deeper look into my code or if accessing AVFormatContext from
> different threads (without simultaneous access) is not okay.
>
> I have a working version that uses only one thread created manually
> outside of the framework (thus it ensures that AVFormatContext will always
> be accessed from the same exact thread).
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220818/db524d1e/attachment.htm>


More information about the Libav-user mailing list