[FFmpeg-trac] #9519(documentation:new): Inconsistent Documentation for avformat_new_stream

FFmpeg trac at avcodec.org
Sat Nov 20 04:05:33 EET 2021


#9519: Inconsistent Documentation for avformat_new_stream
-------------------------------------+-------------------------------------
             Reporter:  Philip Mann  |                     Type:  defect
               Status:  new          |                 Priority:  minor
            Component:               |                  Version:
  documentation                      |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 In
 https://ffmpeg.org/doxygen/4.1/group__lavf__core.html#gadcb0fd3e507d9b58fe78f61f8ad39827,
 the documentation for avformat_new_stream says about the AVCodec
 parameter:

  "If non-NULL, the AVCodecContext corresponding to the new stream will be
 initialized to use this codec. This is needed for e.g. codec-specific
 defaults to be set, so codec should be provided if it is known."


 However, the datatype of the 2nd parameter is AVCodec, not AVCodecContext.
 This seems to be a mistake in the documentation.


 Also, in the detailed description for
 https://ffmpeg.org/doxygen/4.1/group__lavf__encoding.html, it says

  "Unless the format is of the AVFMT_NOSTREAMS type, at least one stream
 must be created with the avformat_new_stream() function. The caller should
 fill the stream codec parameters information, such as the codec type, id
 and other parameters (e.g. width / height, the pixel or sample format,
 etc.) as known. The stream timebase should be set to the timebase that the
 caller desires to use for this stream (note that the timebase actually
 used by the muxer can be different, as will be described later)."


 This doesn't seem to make sense because the 2nd parameter to the function
 is just the AVCodec, not the AVCodecContext. it's unclear from the
 documentation what passing the codec to avformat_new_stream() really does.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9519>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list