[FFmpeg-trac] #7220(avformat:new): Pointer returned from av_demuxer_iterate() should not be const

FFmpeg trac at avcodec.org
Sat May 19 19:33:56 EEST 2018


#7220: Pointer returned from av_demuxer_iterate() should not be const
-----------------------------------+--------------------------------------
             Reporter:  jlindgren  |                     Type:  defect
               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:

 av_demuxer_iterate() was added in commit 0694d8702421 as a replacement for
 av_iformat_next().  However, it's not a very good replacement since it
 returns <const AVInputFormat *> instead of <AVInputFormat *>.

 In order to do anything useful with the returned pointer, such as pass it
 to avformat_open_input(), it's now necessary to add an ugly cast to get
 rid of the <const>.  This seems like an oversight.

 How to reproduce:

 1. Attempt to use av_demuxer_iterate() in conjunction with the rest of the
 FFmpeg API.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7220>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list