# HG changeset patch # User michael # Date 1215869126 0 # Node ID b3e976d080cdfe07a95c42b48d59c5d96f21bdd4 # Parent b016a776ce4b51af197d042401cbcd8b81baf359 Move set_codec_from_probe_data() up to where the other probe functions are. diff -r b016a776ce4b -r b3e976d080cd utils.c --- a/utils.c Sat Jul 12 13:15:00 2008 +0000 +++ b/utils.c Sat Jul 12 13:25:26 2008 +0000 @@ -293,6 +293,20 @@ 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 @@ 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) {