[Libav-user] avio_alloc_context with multiple threads

Victor dMdB ffmpeg at eml.cc
Sun Jan 1 18:07:54 EET 2017


On Sun, 1 Jan 2017, at 11:04 PM, Charles wrote:
> On 01/01/2017 05:22 AM, Victor dMdB wrote:
> > If I have multiple streams of distinct data, how would I go about making
> > sure data is thread safe in real-time applications?
> >
> > My code is in C++, so I managed to pass a write function using extern C
> > but that makes the function global (ie not thread safe), I tried fixing
> > with thread_local but i then ran into other issues.
> >
> > I then tried using the private data ptr, but then I get a data race,
> > because I was just polling with a while loop in another thread, which is
> > rather unreliable.
> >
> > Are there any previous examples of how to do this?
> > _______________________________________________
> > Libav-user mailing list
> > Libav-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/libav-user
> 
> Muxing or Demuxing? Multiple streams are files or actual transport
> streams?
> 
> Thanks
> Charles
> 
> 
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user


In my case it is to mux mp4 files into rtp format, would it be different
if it were transport streams?


More information about the Libav-user mailing list