[FFmpeg-cvslog] avformat: deprecate unused MP4A_LATM flag

Gyan Doshi git at videolan.org
Wed Jun 13 08:01:57 EEST 2018


ffmpeg | branch: master | Gyan Doshi <ffmpeg at gyani.pro> | Sun Jun 10 20:36:10 2018 +0530| [67747c89ad4d3bfb4381c3d274603a4f0da773d8] | committer: Gyan Doshi

avformat: deprecate unused MP4A_LATM flag

A generic lavf flag for AAC LATM packetization for the RTP muxer was
added in ef409645f0 and then made inert 20 days later in 0832122880
when a private muxer option was added and the generic flag no longer
read.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67747c89ad4d3bfb4381c3d274603a4f0da773d8
---

 doc/formats.texi            | 2 --
 libavformat/avformat.h      | 4 +++-
 libavformat/options_table.h | 4 +++-
 libavformat/rtpenc_chain.c  | 2 +-
 libavformat/version.h       | 3 +++
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/doc/formats.texi b/doc/formats.texi
index ddd7743548..e29bc501c3 100644
--- a/doc/formats.texi
+++ b/doc/formats.texi
@@ -53,8 +53,6 @@ Discard corrupted frames.
 Try to interleave output packets by DTS.
 @item keepside
 Do not merge side data.
- at item latm
-Enable RTP MP4A-LATM payload.
 @item nobuffer
 Reduce the latency introduced by optional buffering
 @item bitexact
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index ade918f99c..fdaffa5bf4 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1483,7 +1483,9 @@ typedef struct AVFormatContext {
  * This flag is mainly intended for testing.
  */
 #define AVFMT_FLAG_BITEXACT         0x0400
-#define AVFMT_FLAG_MP4A_LATM    0x8000 ///< Enable RTP MP4A-LATM payload
+#if FF_API_LAVF_MP4A_LATM
+#define AVFMT_FLAG_MP4A_LATM    0x8000 ///< Deprecated, does nothing.
+#endif
 #define AVFMT_FLAG_SORT_DTS    0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
 #define AVFMT_FLAG_PRIV_OPT    0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted)
 #if FF_API_LAVF_KEEPSIDE_FLAG
diff --git a/libavformat/options_table.h b/libavformat/options_table.h
index b7a5b3c054..f2f077b34f 100644
--- a/libavformat/options_table.h
+++ b/libavformat/options_table.h
@@ -52,7 +52,9 @@ static const AVOption avformat_options[] = {
 {"keepside", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_KEEP_SIDE_DATA }, INT_MIN, INT_MAX, D, "fflags"},
 #endif
 {"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, "fflags"},
-{"latm", "enable RTP MP4A-LATM payload", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"},
+#if FF_API_LAVF_MP4A_LATM
+{"latm", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"},
+#endif
 {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"},
 {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" },
 {"shortest", "stop muxing with the shortest stream", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_SHORTEST }, 0, 0, E, "fflags" },
diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
index e69fdc27cf..d3c1bc96dc 100644
--- a/libavformat/rtpenc_chain.c
+++ b/libavformat/rtpenc_chain.c
@@ -58,7 +58,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
     rtpctx->max_delay = s->max_delay;
     /* Copy other stream parameters. */
     rtpctx->streams[0]->sample_aspect_ratio = st->sample_aspect_ratio;
-    rtpctx->flags |= s->flags & (AVFMT_FLAG_MP4A_LATM | AVFMT_FLAG_BITEXACT);
+    rtpctx->flags |= s->flags & AVFMT_FLAG_BITEXACT;
 
     /* Get the payload type from the codec */
     if (st->id < RTP_PT_PRIVATE)
diff --git a/libavformat/version.h b/libavformat/version.h
index b0507474c1..3c54efbb37 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -97,6 +97,9 @@
 #ifndef FF_API_DASH_MIN_SEG_DURATION
 #define FF_API_DASH_MIN_SEG_DURATION    (LIBAVFORMAT_VERSION_MAJOR < 59)
 #endif
+#ifndef FF_API_LAVF_MP4A_LATM
+#define FF_API_LAVF_MP4A_LATM           (LIBAVFORMAT_VERSION_MAJOR < 59)
+#endif
 
 
 #ifndef FF_API_R_FRAME_RATE



More information about the ffmpeg-cvslog mailing list