diff mp3.c @ 3561:bc473761b9e7 libavformat

Move one function that is only used for muxing below #ifdef CONFIG_MUXERS.
author diego
date Fri, 11 Jul 2008 07:41:11 +0000
parents 3dfb35d2ac51
children 3790cb6c893d
line wrap: on
line diff
--- a/mp3.c	Fri Jul 11 07:39:33 2008 +0000
+++ b/mp3.c	Fri Jul 11 07:41:11 2008 +0000
@@ -360,37 +360,6 @@
     return 0;
 }
 
-static void id3v1_create_tag(AVFormatContext *s, uint8_t *buf)
-{
-    int v, i;
-
-    memset(buf, 0, ID3v1_TAG_SIZE); /* fail safe */
-    buf[0] = 'T';
-    buf[1] = 'A';
-    buf[2] = 'G';
-    strncpy(buf + 3, s->title, 30);
-    strncpy(buf + 33, s->author, 30);
-    strncpy(buf + 63, s->album, 30);
-    v = s->year;
-    if (v > 0) {
-        for(i = 0;i < 4; i++) {
-            buf[96 - i] = '0' + (v % 10);
-            v = v / 10;
-        }
-    }
-    strncpy(buf + 97, s->comment, 30);
-    if (s->track != 0) {
-        buf[125] = 0;
-        buf[126] = s->track;
-    }
-    for(i = 0; i <= ID3v1_GENRE_MAX; i++) {
-        if (!strcasecmp(s->genre, id3v1_genre_str[i])) {
-            buf[127] = i;
-            break;
-        }
-    }
-}
-
 /* mp3 read */
 
 static int mp3_read_probe(AVProbeData *p)
@@ -552,6 +521,37 @@
 }
 
 #ifdef CONFIG_MUXERS
+static void id3v1_create_tag(AVFormatContext *s, uint8_t *buf)
+{
+    int v, i;
+
+    memset(buf, 0, ID3v1_TAG_SIZE); /* fail safe */
+    buf[0] = 'T';
+    buf[1] = 'A';
+    buf[2] = 'G';
+    strncpy(buf + 3, s->title, 30);
+    strncpy(buf + 33, s->author, 30);
+    strncpy(buf + 63, s->album, 30);
+    v = s->year;
+    if (v > 0) {
+        for(i = 0;i < 4; i++) {
+            buf[96 - i] = '0' + (v % 10);
+            v = v / 10;
+        }
+    }
+    strncpy(buf + 97, s->comment, 30);
+    if (s->track != 0) {
+        buf[125] = 0;
+        buf[126] = s->track;
+    }
+    for(i = 0; i <= ID3v1_GENRE_MAX; i++) {
+        if (!strcasecmp(s->genre, id3v1_genre_str[i])) {
+            buf[127] = i;
+            break;
+        }
+    }
+}
+
 /* simple formats */
 
 static void id3v2_put_size(AVFormatContext *s, int size)