[FFmpeg-trac] #9871(avformat:new): AccessViolationException setting seekable = 1

FFmpeg trac at avcodec.org
Thu Aug 11 08:33:14 EEST 2022


#9871: AccessViolationException setting seekable = 1
-------------------------------------+-------------------------------------
             Reporter:  sean         |                     Type:  defect
  tearney                            |
               Status:  new          |                 Priority:  normal
            Component:  avformat     |                  Version:  git-
                                     |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 How to reproduce:
 {{{
             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;
             avformat_write_header(formatContext, null);
             avio_close(formatContext->pb);
 }}}

 setting formatContext->pb->seekable = 1 is throwing an access violation
 exception when calling avio_close.
 comment out that line and avio_close works fine.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9871>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list