#9871(avformat:new): AccessViolationException setting seekable = 1
#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
#9871: AccessViolationException setting seekable = 1 --------------------------------------+------------------------------------ Reporter: sean tearney | Owner: (none) Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | --------------------------------------+------------------------------------ Comment (by Carl Eugen Hoyos): This has currently no similarities with a valid ticket, isn't this a question for the libav-user mailing list? -- Ticket URL: <https://trac.ffmpeg.org/ticket/9871#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9871: AccessViolationException setting seekable = 1 ------------------------------------+------------------------------------ Reporter: sporn | Owner: (none) Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by sporn): Sure, i'll post it there instead, although, not particularly confident of a response. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9871#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9871: AccessViolationException setting seekable = 1 ------------------------------------+------------------------------------ Reporter: sporn | Owner: (none) Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by mkver): I can't reproduce this (after converting the snippet into C). You will have to provide more details to allow us to reproduce this. A stacktrace would also be nice. Nevertheless, here are some comments: First of all, an AVIOContext created as above will already be seekable (after all, you are just writing an ordinary file). Second, seekable is not a boolean, but a bitfield, so the likely intended value is AVIO_SEEKABLE_NORMAL (which happens to be 1). 3. Using avio_close() is generally dangerous, because it frees the memory, but leaves a dangling pointer behind. Better use avio_closep(). Finally, the videoCodecContext in your example is unused. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9871#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9871: AccessViolationException setting seekable = 1 -------------------------------------+------------------------------------- Reporter: sporn | Owner: (none) Type: defect | Status: closed Priority: normal | Component: avformat Version: git-master | Resolution: | needs_more_info Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Carl Eugen Hoyos): * status: new => closed * resolution: => needs_more_info -- Ticket URL: <https://trac.ffmpeg.org/ticket/9871#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg