diff mbox series

[FFmpeg-devel,03/10] avformat/avformat.h: Correct some comments

Message ID 20200331123745.6461-4-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series libavformat/mux patches
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt March 31, 2020, 12:37 p.m. UTC
1. When set_parameters was removed from AVOutputFormat in 2fb75019, it
was forgotten to remove the comment pertaining to it. Said comment now
appeared to apply to interleave_packet(); it is of course nonsense and has
been replaced by an accurate description.
2. The description of av_write_uncoded_frame() suggested
av_interleaved_write_frame() as a replacement if the input is not
already correctly interleaved; it also referred to said function for
details. Given that said function can't write AVFrames and that the
specifics of writing uncoded frames are explained in the description
of av_interleaved_write_uncoded_frame(), both references have been fixed.
3. Removed an outdated comment about avformat_seek_file().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/avformat.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Marton Balint March 31, 2020, 7:47 p.m. UTC | #1
On Tue, 31 Mar 2020, Andreas Rheinhardt wrote:

> 1. When set_parameters was removed from AVOutputFormat in 2fb75019, it
> was forgotten to remove the comment pertaining to it. Said comment now
> appeared to apply to interleave_packet(); it is of course nonsense and has
> been replaced by an accurate description.
> 2. The description of av_write_uncoded_frame() suggested
> av_interleaved_write_frame() as a replacement if the input is not
> already correctly interleaved; it also referred to said function for
> details. Given that said function can't write AVFrames and that the
> specifics of writing uncoded frames are explained in the description
> of av_interleaved_write_uncoded_frame(), both references have been fixed.
> 3. Removed an outdated comment about avformat_seek_file().
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
> libavformat/avformat.h | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index e906d7b7e9..39b99b4481 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -551,7 +551,8 @@ typedef struct AVOutputFormat {
>     int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
>     int (*write_trailer)(struct AVFormatContext *);
>     /**
> -     * Currently only used to set pixel format if not YUV420P.
> +     * A format-specific function for interleavement.
> +     * If unset, packets will be interleaved by dts.
>      */
>     int (*interleave_packet)(struct AVFormatContext *, AVPacket *out,
>                              AVPacket *in, int flush);
> @@ -2453,8 +2454,6 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
>  * @return >=0 on success, error code otherwise
>  *
>  * @note This is part of the new seek API which is still under construction.
> - *       Thus do not use this yet. It may change at any time, do not expect
> - *       ABI compatibility yet!
>  */
> int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
> 
> @@ -2641,9 +2640,9 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);
>  * Write an uncoded frame to an output media file.
>  *
>  * The frame must be correctly interleaved according to the container
> - * specification; if not, then av_interleaved_write_frame() must be used.
> + * specification; if not, av_interleaved_write_uncoded_frame() must be used.
>  *
> - * See av_interleaved_write_frame() for details.
> + * See av_interleaved_write_uncoded_frame() for details.
>  */
> int av_write_uncoded_frame(AVFormatContext *s, int stream_index,
>                            AVFrame *frame);
> --

LGTM, thanks.

Marton
diff mbox series

Patch

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index e906d7b7e9..39b99b4481 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -551,7 +551,8 @@  typedef struct AVOutputFormat {
     int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
     int (*write_trailer)(struct AVFormatContext *);
     /**
-     * Currently only used to set pixel format if not YUV420P.
+     * A format-specific function for interleavement.
+     * If unset, packets will be interleaved by dts.
      */
     int (*interleave_packet)(struct AVFormatContext *, AVPacket *out,
                              AVPacket *in, int flush);
@@ -2453,8 +2454,6 @@  int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
  * @return >=0 on success, error code otherwise
  *
  * @note This is part of the new seek API which is still under construction.
- *       Thus do not use this yet. It may change at any time, do not expect
- *       ABI compatibility yet!
  */
 int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
 
@@ -2641,9 +2640,9 @@  int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);
  * Write an uncoded frame to an output media file.
  *
  * The frame must be correctly interleaved according to the container
- * specification; if not, then av_interleaved_write_frame() must be used.
+ * specification; if not, av_interleaved_write_uncoded_frame() must be used.
  *
- * See av_interleaved_write_frame() for details.
+ * See av_interleaved_write_uncoded_frame() for details.
  */
 int av_write_uncoded_frame(AVFormatContext *s, int stream_index,
                            AVFrame *frame);