> On 18. 8. 2022., at 00:55, Olzhas Zhumabek 
> <[email protected]> wrote:
> 
> Hi,
> 
> Recently when utilizing ffmpeg to decode av1 codec video, I started seeing 
> weird errors when transitioning from single threaded implementation to multi 
> threaded one. av_read_frame started failing, because the context got its 
> priv_data set to NULL (there were no lines except thread initialization 
> between the line I observed NULL on and the line where it was non-NULL). Does 
> ffmpeg somehow differentiate between which thread it is run on and what can I 
> do to preserve correctness of my program?
> _______________________________________________
> Libav-user mailing list
> [email protected]
> https://ffmpeg.org/mailman/listinfo/libav-user
> 
> To unsubscribe, visit link above, or email
> [email protected] with subject "unsubscribe”.

Hello, 

av_read_frame() is not thread safe, it can only be read from one thread. You 
can then read with one thread and make multiple threads per stream to process 
the data. 

Kind regards,
Strahinja


_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to