summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-10-16 19:05:11 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-10-16 19:05:11 +0200
commit6bca574a98ba604459f6ee92538b19d25bba0973 (patch)
tree85331d4fe0b52a97d9181190163ca08e95b05c0e /ffmpeg.c
parent02b651a7e39844edd573a9d057ec87a0160bef8d (diff)
Allow to overwrite input stream tags.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 4eb7ac43b9..a8fc82feb7 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2988,6 +2988,7 @@ static AVCodec *choose_codec(OptionsContext *o, AVFormatContext *s, AVStream *st
static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
{
int i, rfps, rfps_base;
+ char *next, *codec_tag = NULL;
for (i = 0; i < ic->nb_streams; i++) {
AVStream *st = ic->streams[i];
@@ -3005,6 +3006,14 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
MATCH_PER_STREAM_OPT(ts_scale, dbl, scale, ic, st);
ist->ts_scale = scale;
+ MATCH_PER_STREAM_OPT(codec_tags, str, codec_tag, ic, st);
+ if (codec_tag) {
+ uint32_t tag = strtol(codec_tag, &next, 0);
+ if (*next)
+ tag = AV_RL32(codec_tag);
+ st->codec->codec_tag = tag;
+ }
+
ist->dec = choose_codec(o, ic, st, dec->codec_type);
if (!ist->dec)
ist->dec = avcodec_find_decoder(dec->codec_id);