[FFmpeg-cvslog] Merge commit 'e72d6fa08a3c1876109149401753a8d2c736d418'

Hendrik Leppkes git at videolan.org
Mon Nov 14 12:33:05 EET 2016


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Mon Nov 14 11:19:25 2016 +0100| [a0bc6b51d4f6d01eb4bcaec5489ca67037687a77] | committer: Hendrik Leppkes

Merge commit 'e72d6fa08a3c1876109149401753a8d2c736d418'

* commit 'e72d6fa08a3c1876109149401753a8d2c736d418':
  build: Move MP2 muxer declaration away from MP3 muxer code

Merged-by: Hendrik Leppkes <h.leppkes at gmail.com>

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

 libavcodec/Makefile  |  1 -
 libavformat/Makefile |  2 +-
 libavformat/mp3enc.c | 16 ----------------
 libavformat/rawenc.c | 13 +++++++++++++
 4 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 66ef2ac..8c18906 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -820,7 +820,6 @@ OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER)    += mpeg4audio.o vorbis_data.o    \
                                           flac.o flacdata.o
 OBJS-$(CONFIG_MATROSKA_MUXER)          += flac.o flacdata.o vorbis_data.o
 OBJS-$(CONFIG_MOV_DEMUXER)             += ac3tab.o
-OBJS-$(CONFIG_MP2_MUXER)               += mpegaudiodata.o mpegaudiodecheader.o
 OBJS-$(CONFIG_MP3_MUXER)               += mpegaudiodata.o mpegaudiodecheader.o
 OBJS-$(CONFIG_MPEGTS_MUXER)            += mpeg4audio.o
 OBJS-$(CONFIG_MXF_MUXER)               += dnxhddata.o
diff --git a/libavformat/Makefile b/libavformat/Makefile
index e6bfc42..5ee0deb 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -285,7 +285,7 @@ OBJS-$(CONFIG_MOV_DEMUXER)               += mov.o mov_chan.o replaygain.o
 OBJS-$(CONFIG_MOV_MUXER)                 += movenc.o avc.o hevc.o vpcc.o \
                                             movenchint.o mov_chan.o rtp.o \
                                             movenccenc.o rawutils.o
-OBJS-$(CONFIG_MP2_MUXER)                 += mp3enc.o rawenc.o id3v2enc.o
+OBJS-$(CONFIG_MP2_MUXER)                 += rawenc.o
 OBJS-$(CONFIG_MP3_DEMUXER)               += mp3dec.o replaygain.o
 OBJS-$(CONFIG_MP3_MUXER)                 += mp3enc.o rawenc.o id3v2enc.o
 OBJS-$(CONFIG_MPC_DEMUXER)               += mpc.o apetag.o img2.o
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 4c97fa1..49f3742 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -490,21 +490,6 @@ static int query_codec(enum AVCodecID id, int std_compliance)
     return -1;
 }
 
-#if CONFIG_MP2_MUXER
-AVOutputFormat ff_mp2_muxer = {
-    .name              = "mp2",
-    .long_name         = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
-    .mime_type         = "audio/mpeg",
-    .extensions        = "mp2,m2a,mpa",
-    .audio_codec       = AV_CODEC_ID_MP2,
-    .video_codec       = AV_CODEC_ID_NONE,
-    .write_packet      = ff_raw_write_packet,
-    .flags             = AVFMT_NOTIMESTAMPS,
-};
-#endif
-
-#if CONFIG_MP3_MUXER
-
 static const AVOption options[] = {
     { "id3v2_version", "Select ID3v2 version to write. Currently 3 and 4 are supported.",
       offsetof(MP3Context, id3v2_version), AV_OPT_TYPE_INT, {.i64 = 4}, 0, 4, AV_OPT_FLAG_ENCODING_PARAM},
@@ -652,4 +637,3 @@ AVOutputFormat ff_mp3_muxer = {
     .flags             = AVFMT_NOTIMESTAMPS,
     .priv_class        = &mp3_muxer_class,
 };
-#endif
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 730e99a..0edcd1c 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -337,6 +337,19 @@ AVOutputFormat ff_mlp_muxer = {
 };
 #endif
 
+#if CONFIG_MP2_MUXER
+AVOutputFormat ff_mp2_muxer = {
+    .name              = "mp2",
+    .long_name         = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
+    .mime_type         = "audio/mpeg",
+    .extensions        = "mp2,m2a,mpa",
+    .audio_codec       = AV_CODEC_ID_MP2,
+    .video_codec       = AV_CODEC_ID_NONE,
+    .write_packet      = ff_raw_write_packet,
+    .flags             = AVFMT_NOTIMESTAMPS,
+};
+#endif
+
 #if CONFIG_MPEG1VIDEO_MUXER
 AVOutputFormat ff_mpeg1video_muxer = {
     .name              = "mpeg1video",


======================================================================

diff --cc libavcodec/Makefile
index 66ef2ac,09b16e7..8c18906
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@@ -816,21 -645,16 +816,20 @@@ OBJS-$(CONFIG_FLV_DEMUXER)             
  OBJS-$(CONFIG_GXF_DEMUXER)             += mpeg12data.o
  OBJS-$(CONFIG_IFF_DEMUXER)             += iff.o
  OBJS-$(CONFIG_LATM_MUXER)              += mpeg4audio.o
 -OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER)    += mpeg4audio.o                  \
 +OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER)    += mpeg4audio.o vorbis_data.o    \
                                            flac.o flacdata.o
 -OBJS-$(CONFIG_MATROSKA_MUXER)          += flac.o flacdata.o
 +OBJS-$(CONFIG_MATROSKA_MUXER)          += flac.o flacdata.o vorbis_data.o
  OBJS-$(CONFIG_MOV_DEMUXER)             += ac3tab.o
- OBJS-$(CONFIG_MP2_MUXER)               += mpegaudiodata.o mpegaudiodecheader.o
  OBJS-$(CONFIG_MP3_MUXER)               += mpegaudiodata.o mpegaudiodecheader.o
  OBJS-$(CONFIG_MPEGTS_MUXER)            += mpeg4audio.o
 +OBJS-$(CONFIG_MXF_MUXER)               += dnxhddata.o
  OBJS-$(CONFIG_NUT_MUXER)               += mpegaudiodata.o
 +OBJS-$(CONFIG_NUT_DEMUXER)             += mpegaudiodata.o mpeg4audio.o
 +OBJS-$(CONFIG_OGA_MUXER)               += flac.o flacdata.o
  OBJS-$(CONFIG_OGG_DEMUXER)             += mpeg12data.o \
 -                                          dirac.o
 -OBJS-$(CONFIG_OGG_MUXER)               += flac.o flacdata.o
 +                                          dirac.o vorbis_data.o
 +OBJS-$(CONFIG_OGG_MUXER)               += flac.o flacdata.o \
 +                                          vorbis_data.o
  OBJS-$(CONFIG_RTP_MUXER)               += mpeg4audio.o
  OBJS-$(CONFIG_SPDIF_DEMUXER)           += aacadtsdec.o mpeg4audio.o
  OBJS-$(CONFIG_SPDIF_MUXER)             += dca.o
diff --cc libavformat/Makefile
index e6bfc42,d06d5d6..5ee0deb
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@@ -267,25 -184,19 +267,25 @@@ OBJS-$(CONFIG_MATROSKA_DEMUXER
                                              flac_picture.o replaygain.o
  OBJS-$(CONFIG_MATROSKA_MUXER)            += matroskaenc.o matroska.o \
                                              avc.o hevc.o \
 -                                            flacenc_header.o avlanguage.o vorbiscomment.o wv.o
 -OBJS-$(CONFIG_MD5_MUXER)                 += md5enc.o
 +                                            flacenc_header.o avlanguage.o vorbiscomment.o wv.o \
 +                                            webmdashenc.o webm_chunk.o
 +OBJS-$(CONFIG_MD5_MUXER)                 += hashenc.o
 +OBJS-$(CONFIG_MGSTS_DEMUXER)             += mgsts.o
 +OBJS-$(CONFIG_MICRODVD_DEMUXER)          += microdvddec.o subtitles.o
 +OBJS-$(CONFIG_MICRODVD_MUXER)            += microdvdenc.o
  OBJS-$(CONFIG_MJPEG_DEMUXER)             += rawdec.o
  OBJS-$(CONFIG_MJPEG_MUXER)               += rawenc.o
 -OBJS-$(CONFIG_MLP_DEMUXER)               += rawdec.o
 +OBJS-$(CONFIG_MLP_DEMUXER)               += rawdec.o mlpdec.o
  OBJS-$(CONFIG_MLP_MUXER)                 += rawenc.o
 +OBJS-$(CONFIG_MLV_DEMUXER)               += mlvdec.o riffdec.o
  OBJS-$(CONFIG_MM_DEMUXER)                += mm.o
 -OBJS-$(CONFIG_MMF_DEMUXER)               += mmf.o pcm.o
 -OBJS-$(CONFIG_MMF_MUXER)                 += mmf.o
 +OBJS-$(CONFIG_MMF_DEMUXER)               += mmf.o
 +OBJS-$(CONFIG_MMF_MUXER)                 += mmf.o rawenc.o
  OBJS-$(CONFIG_MOV_DEMUXER)               += mov.o mov_chan.o replaygain.o
 -OBJS-$(CONFIG_MOV_MUXER)                 += movenc.o avc.o hevc.o \
 -                                            movenchint.o mov_chan.o
 +OBJS-$(CONFIG_MOV_MUXER)                 += movenc.o avc.o hevc.o vpcc.o \
 +                                            movenchint.o mov_chan.o rtp.o \
 +                                            movenccenc.o rawutils.o
- OBJS-$(CONFIG_MP2_MUXER)                 += mp3enc.o rawenc.o id3v2enc.o
+ OBJS-$(CONFIG_MP2_MUXER)                 += rawenc.o
  OBJS-$(CONFIG_MP3_DEMUXER)               += mp3dec.o replaygain.o
  OBJS-$(CONFIG_MP3_MUXER)                 += mp3enc.o rawenc.o id3v2enc.o
  OBJS-$(CONFIG_MPC_DEMUXER)               += mpc.o apetag.o img2.o
diff --cc libavformat/mp3enc.c
index 4c97fa1,a62c7f6..49f3742
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@@ -479,32 -432,6 +479,17 @@@ static int mp3_write_trailer(struct AVF
      return 0;
  }
  
 +static int query_codec(enum AVCodecID id, int std_compliance)
 +{
 +    const CodecMime *cm= ff_id3v2_mime_tags;
 +    while(cm->id != AV_CODEC_ID_NONE) {
 +        if(id == cm->id)
 +            return MKTAG('A', 'P', 'I', 'C');
 +        cm++;
 +    }
 +    return -1;
 +}
 +
- #if CONFIG_MP2_MUXER
- AVOutputFormat ff_mp2_muxer = {
-     .name              = "mp2",
-     .long_name         = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
-     .mime_type         = "audio/mpeg",
-     .extensions        = "mp2,m2a,mpa",
-     .audio_codec       = AV_CODEC_ID_MP2,
-     .video_codec       = AV_CODEC_ID_NONE,
-     .write_packet      = ff_raw_write_packet,
-     .flags             = AVFMT_NOTIMESTAMPS,
- };
- #endif
- 
- #if CONFIG_MP3_MUXER
- 
  static const AVOption options[] = {
      { "id3v2_version", "Select ID3v2 version to write. Currently 3 and 4 are supported.",
        offsetof(MP3Context, id3v2_version), AV_OPT_TYPE_INT, {.i64 = 4}, 0, 4, AV_OPT_FLAG_ENCODING_PARAM},



More information about the ffmpeg-cvslog mailing list