[Libav-user] Crash on avio_close when setting seekable=1
Sean.T
sean at ispyconnect.com
Fri Aug 12 03:02:29 EEST 2022
I updated to the latest code from git and am getting a system access
violation exception when calling avio_close if i set the format context
pb->seekable=1
repro code here:
var outputFormat = av_guess_format("mp4", @"D:\test.mp4", null);
var formatContext = avformat_alloc_context();
formatContext->oformat = outputFormat;
var videoStream = avformat_new_stream(formatContext, null);
var videoCodec =
avcodec_find_encoder(AVCodecID.AV_CODEC_ID_H264);
var videoCodecContext = avcodec_alloc_context3(videoCodec);
avcodec_open2(videoCodecContext, videoCodec, null);
avio_open(&formatContext->pb, @"D:\test.mp4", AVIO_FLAG_WRITE);
formatContext->pb->seekable = 1; //<-- comment out to fix
avformat_write_header(formatContext, null);
avio_close(formatContext->pb);//<-- crashes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220812/492c0aaf/attachment.htm>
More information about the Libav-user
mailing list