summaryrefslogtreecommitdiff
path: root/libavformat/img2.c
diff options
context:
space:
mode:
authortab <tab@0x09.net>2015-09-06 11:07:20 -0400
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-07 02:48:58 +0200
commitfb135139fd3992eb1f0eacc9cfd878e05b95ec46 (patch)
treec08840b331cd163c87f5dee44fb7cbf3a9db438e /libavformat/img2.c
parentb480f0e37a4297f19ab9e2244a232ba9d5baf499 (diff)
avformat: implement query_codec for the image2 muxer.
Allows avformat_query_codec to be used to check for valid image2 encoders. Reuses the existing ff_guess_image2_codec ID table. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r--libavformat/img2.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 184600ff53..50352b53b2 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -22,13 +22,9 @@
#include "libavutil/avstring.h"
#include "internal.h"
+#include "img2.h"
-typedef struct IdStrMap {
- enum AVCodecID id;
- const char *str;
-} IdStrMap;
-
-static const IdStrMap img_tags[] = {
+const IdStrMap ff_img_tags[] = {
{ AV_CODEC_ID_MJPEG, "jpeg" },
{ AV_CODEC_ID_MJPEG, "jpg" },
{ AV_CODEC_ID_MJPEG, "jps" },
@@ -103,5 +99,5 @@ static enum AVCodecID av_str2id(const IdStrMap *tags, const char *str)
enum AVCodecID ff_guess_image2_codec(const char *filename)
{
- return av_str2id(img_tags, filename);
+ return av_str2id(ff_img_tags, filename);
}