aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2010-10-31 19:55:13 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2010-10-31 19:55:13 +0000
commit0d0778b060011970fee40f67269d0c25284dd89a (patch)
tree9bc26e5f299f2ff504427fe713d5cfe57720c057
parent153ca56b38d84c4e144fdd72764035ebe4304002 (diff)
downloadffmpeg-0d0778b060011970fee40f67269d0c25284dd89a.tar.gz
ffmpeg: fix opt_codec_tag() return value
opt_codec_tag() is now used under OPT_FUNC2, which must return a value. Originally committed as revision 25616 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 83f4bb712d..7ad055d919 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2855,7 +2855,7 @@ static void opt_subtitle_codec(const char *arg)
opt_codec(&subtitle_stream_copy, &subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, arg);
}
-static void opt_codec_tag(const char *opt, const char *arg)
+static int opt_codec_tag(const char *opt, const char *arg)
{
char *tail;
uint32_t *codec_tag;
@@ -2863,10 +2863,14 @@ static void opt_codec_tag(const char *opt, const char *arg)
codec_tag = !strcmp(opt, "atag") ? &audio_codec_tag :
!strcmp(opt, "vtag") ? &video_codec_tag :
!strcmp(opt, "stag") ? &subtitle_codec_tag : NULL;
+ if (!codec_tag)
+ return -1;
*codec_tag = strtol(arg, &tail, 0);
if (!tail || *tail)
*codec_tag = arg[0] + (arg[1]<<8) + (arg[2]<<16) + (arg[3]<<24);
+
+ return 0;
}
static void opt_map(const char *arg)