On 11/11/11 8:02 AM, Evgeny Yakimov wrote:
Hey LuI've managed to get the output bit working by setting a lock around: lock av_guess_format avformat_alloc_context av_new_stream avio_open avformat_write_header unlock However I have been unable to resolve issues regarding the following setup: 1 thread av_open_file, while (av_read_frame){ avcodec_decode_video,avcoded_decode_audio); Multiple threads swscale Multiple threads audio_resample Multiple threads x264_encode (accessed directly, not via libav) Multiple threads faacEncode (accessed directly, not via libav) It seems that if I use a non libav based input (i.e. fake raw frames from a test module) that everything works, where as if I use libav I get segfaults (which occur in the x264_encoder). However I can still use libav to read a file/mpeg stream if I dont have any x264 encoder threads running at the same time. I've spent about a week on this, inserting random locks all over the place, with no luck, additionally from this scenario the valgrind output has been unusable referencing many memory issues both within x264 and libav , generaly of the nature - Uninitialised read/write. Unfortunately it looks like I'm going to have to "fork" my input rather then "thread" it.
I need see the code, I _guess_ you are using the same avformat context multiple time and av_guess_format breaks on you badly.
lu _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
