[FFmpeg-cvslog] r14180 - trunk/libavformat/utils.c

michael subversion
Sat Jul 12 15:25:26 CEST 2008


Author: michael
Date: Sat Jul 12 15:25:26 2008
New Revision: 14180

Log:
Move set_codec_from_probe_data() up to where the other probe functions are.


Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Sat Jul 12 15:25:26 2008
@@ -293,6 +293,20 @@ AVInputFormat *av_probe_input_format(AVP
     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
     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) {




More information about the ffmpeg-cvslog mailing list