diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-07-12 13:25:26 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-07-12 13:25:26 +0000 |
commit | 64cd3108dfc400dc456975ae893d313b6088e59b (patch) | |
tree | 7c470f0935d5f15a19d616c2ef447b0dba8adeef /libavformat/utils.c | |
parent | 3179da621a49af4b056bea52d63d6f55644c4bb3 (diff) | |
download | ffmpeg-streaming-64cd3108dfc400dc456975ae893d313b6088e59b.zip ffmpeg-streaming-64cd3108dfc400dc456975ae893d313b6088e59b.tar.gz |
Move set_codec_from_probe_data() up to where the other probe functions are.
Originally committed as revision 14180 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 90f160c..22eae16 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -293,6 +293,20 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened){ return av_probe_input_format2(pd, is_opened, &score); } +static int set_codec_from_probe_data(AVStream *st, AVProbeData *pd, int score) +{ + AVInputFormat *fmt; + fmt = av_probe_input_format2(pd, 1, &score); + + if (fmt) { + if (strncmp(fmt->name, "mp3", 3) == 0) + st->codec->codec_id = CODEC_ID_MP3; + else if (strncmp(fmt->name, "ac3", 3) == 0) + st->codec->codec_id = CODEC_ID_AC3; + } + return !!fmt; +} + /************************************************************/ /* input media file */ @@ -1785,20 +1799,6 @@ static int try_decode_frame(AVStream *st, const uint8_t *data, int size) return ret; } -static int set_codec_from_probe_data(AVStream *st, AVProbeData *pd, int score) -{ - AVInputFormat *fmt; - fmt = av_probe_input_format2(pd, 1, &score); - - if (fmt) { - if (strncmp(fmt->name, "mp3", 3) == 0) - st->codec->codec_id = CODEC_ID_MP3; - else if (strncmp(fmt->name, "ac3", 3) == 0) - st->codec->codec_id = CODEC_ID_AC3; - } - return !!fmt; -} - unsigned int codec_get_tag(const AVCodecTag *tags, int id) { while (tags->id != CODEC_ID_NONE) { |