diff mbox series

[FFmpeg-devel] avformat/Makefile: Remove unnecessary dependencies on vocdec

Message ID 20210223113711.439788-1-andreas.rheinhardt@gmail.com
State Accepted
Commit 78d5e1c6533208b07acf508a4e7f832e3cea8485
Headers show
Series [FFmpeg-devel] avformat/Makefile: Remove unnecessary dependencies on vocdec
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 23, 2021, 11:37 a.m. UTC
Commit 0d1229f1d2b8f26dd50c6be7917bb8ed8cb95364 factored the main part
of the voc demuxer's read_packet function out; yet when this Libav
commit was merged in f99195d56f4aab266926724ca1cfae822df4df16, the
dependency of the other users of this function on vocdec.o was
unnecessarily kept. This commit fixes this.

While just at it, also disable the data only used by the voc demuxer
and muxer in voc.c if both of them are disabled.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/Makefile | 4 ++--
 libavformat/voc.c    | 5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

Comments

Paul B Mahol Feb. 23, 2021, 11:41 a.m. UTC | #1
probably ok
diff mbox series

Patch

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 4b15830659..56fa96ea7f 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -122,7 +122,7 @@  OBJS-$(CONFIG_AVI_DEMUXER)               += avidec.o isom_tags.o
 OBJS-$(CONFIG_AVI_MUXER)                 += avienc.o mpegtsenc.o avlanguage.o rawutils.o
 OBJS-$(CONFIG_AVM2_MUXER)                += swfenc.o swf.o
 OBJS-$(CONFIG_AVR_DEMUXER)               += avr.o pcm.o
-OBJS-$(CONFIG_AVS_DEMUXER)               += avs.o voc_packet.o vocdec.o voc.o
+OBJS-$(CONFIG_AVS_DEMUXER)               += avs.o voc_packet.o voc.o
 OBJS-$(CONFIG_AVS2_DEMUXER)              += avs2dec.o rawdec.o
 OBJS-$(CONFIG_AVS2_MUXER)                += rawenc.o
 OBJS-$(CONFIG_AVS3_DEMUXER)              += avs3dec.o rawdec.o
@@ -137,7 +137,7 @@  OBJS-$(CONFIG_BMV_DEMUXER)               += bmv.o
 OBJS-$(CONFIG_BOA_DEMUXER)               += boadec.o
 OBJS-$(CONFIG_BFSTM_DEMUXER)             += brstm.o
 OBJS-$(CONFIG_BRSTM_DEMUXER)             += brstm.o
-OBJS-$(CONFIG_C93_DEMUXER)               += c93.o voc_packet.o vocdec.o voc.o
+OBJS-$(CONFIG_C93_DEMUXER)               += c93.o voc_packet.o voc.o
 OBJS-$(CONFIG_CAF_DEMUXER)               += cafdec.o caf.o mov_chan.o mov_esds.o
 OBJS-$(CONFIG_CAF_MUXER)                 += cafenc.o caf.o riff.o
 OBJS-$(CONFIG_CAVSVIDEO_DEMUXER)         += cavsvideodec.o rawdec.o
diff --git a/libavformat/voc.c b/libavformat/voc.c
index e4cdf8bf49..04ec0da9ba 100644
--- a/libavformat/voc.c
+++ b/libavformat/voc.c
@@ -19,10 +19,10 @@ 
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "config.h"
 #include "voc.h"
 #include "internal.h"
 
-const unsigned char ff_voc_magic[21] = "Creative Voice File\x1A";
 
 const AVCodecTag ff_voc_codec_tags[] = {
     {AV_CODEC_ID_PCM_U8,        0x00},
@@ -36,4 +36,7 @@  const AVCodecTag ff_voc_codec_tags[] = {
     {AV_CODEC_ID_NONE,             0},
 };
 
+#if CONFIG_VOC_DEMUXER || CONFIG_VOC_MUXER
+const unsigned char ff_voc_magic[21] = "Creative Voice File\x1A";
 const AVCodecTag *const ff_voc_codec_tags_list[] = { ff_voc_codec_tags, NULL };
+#endif