aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-08-08 15:54:02 +0200
committerDiego Biurrun <diego@biurrun.de>2012-08-09 20:05:54 +0200
commit90f7e6176938487a77b8b4cdc8b4eaeeaca3e094 (patch)
tree543b43d9e22a9fb409630593a475226c8d86131a
parent2804ba6a3b862be37986b9c2be3bad6bf4ccb6c7 (diff)
downloadffmpeg-90f7e6176938487a77b8b4cdc8b4eaeeaca3e094.tar.gz
swf: Move shared table out of the header file
-rw-r--r--libavformat/Makefile6
-rw-r--r--libavformat/swf.c29
-rw-r--r--libavformat/swf.h6
-rw-r--r--libavformat/swfdec.c2
-rw-r--r--libavformat/swfenc.c2
5 files changed, 35 insertions, 10 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile
index ffb234f3d4..82dc1c1470 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -47,7 +47,7 @@ OBJS-$(CONFIG_AU_MUXER) += au.o
OBJS-$(CONFIG_AVI_DEMUXER) += avidec.o
OBJS-$(CONFIG_AVI_MUXER) += avienc.o
OBJS-$(CONFIG_AVISYNTH) += avisynth.o
-OBJS-$(CONFIG_AVM2_MUXER) += swfenc.o
+OBJS-$(CONFIG_AVM2_MUXER) += swfenc.o swf.o
OBJS-$(CONFIG_AVS_DEMUXER) += avs.o vocdec.o voc.o
OBJS-$(CONFIG_BETHSOFTVID_DEMUXER) += bethsoftvid.o
OBJS-$(CONFIG_BFI_DEMUXER) += bfi.o
@@ -299,8 +299,8 @@ OBJS-$(CONFIG_SPDIF_MUXER) += spdif.o spdifenc.o
OBJS-$(CONFIG_SRT_DEMUXER) += srtdec.o
OBJS-$(CONFIG_SRT_MUXER) += rawenc.o
OBJS-$(CONFIG_STR_DEMUXER) += psxstr.o
-OBJS-$(CONFIG_SWF_DEMUXER) += swfdec.o
-OBJS-$(CONFIG_SWF_MUXER) += swfenc.o
+OBJS-$(CONFIG_SWF_DEMUXER) += swfdec.o swf.o
+OBJS-$(CONFIG_SWF_MUXER) += swfenc.o swf.o
OBJS-$(CONFIG_THP_DEMUXER) += thp.o
OBJS-$(CONFIG_TIERTEXSEQ_DEMUXER) += tiertexseq.o
OBJS-$(CONFIG_TMV_DEMUXER) += tmv.o
diff --git a/libavformat/swf.c b/libavformat/swf.c
new file mode 100644
index 0000000000..1762991d2b
--- /dev/null
+++ b/libavformat/swf.c
@@ -0,0 +1,29 @@
+/*
+ * Flash Compatible Streaming Format
+ * Copyright (c) 2000 Fabrice Bellard
+ * Copyright (c) 2003 Tinic Uro
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "internal.h"
+
+const AVCodecTag ff_swf_codec_tags[] = {
+ { CODEC_ID_FLV1, 0x02 },
+ { CODEC_ID_VP6F, 0x04 },
+ { CODEC_ID_NONE, 0 },
+};
diff --git a/libavformat/swf.h b/libavformat/swf.h
index 10a05f51b3..b1e477b828 100644
--- a/libavformat/swf.h
+++ b/libavformat/swf.h
@@ -78,10 +78,6 @@ typedef struct {
AVCodecContext *audio_enc, *video_enc;
} SWFContext;
-static const AVCodecTag swf_codec_tags[] = {
- { AV_CODEC_ID_FLV1, 0x02},
- { AV_CODEC_ID_VP6F, 0x04},
- { AV_CODEC_ID_NONE, 0},
-};
+extern const AVCodecTag ff_swf_codec_tags[];
#endif /* AVFORMAT_SWF_H */
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index cef486c40f..09770f4f4a 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -120,7 +120,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
return -1;
vst->id = ch_id;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, avio_r8(pb));
+ vst->codec->codec_id = ff_codec_get_id(ff_swf_codec_tags, avio_r8(pb));
avpriv_set_pts_info(vst, 16, 256, swf->frame_rate);
len -= 8;
} else if (tag == TAG_STREAMHEAD || tag == TAG_STREAMHEAD2) {
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 65ffe261fe..19166503e8 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -347,7 +347,7 @@ static int swf_write_video(AVFormatContext *s,
avio_wl16(pb, enc->width);
avio_wl16(pb, enc->height);
avio_w8(pb, 0);
- avio_w8(pb,ff_codec_get_tag(swf_codec_tags,enc->codec_id));
+ avio_w8(pb,ff_codec_get_tag(ff_swf_codec_tags, enc->codec_id));
put_swf_end_tag(s);
/* place the video object for the first time */