[FFmpeg-cvslog] r14164 - trunk/libavformat/mp3.c
diego
subversion
Fri Jul 11 09:41:12 CEST 2008
Author: diego
Date: Fri Jul 11 09:41:11 2008
New Revision: 14164
Log:
Move one function that is only used for muxing below #ifdef CONFIG_MUXERS.
Modified:
trunk/libavformat/mp3.c
Modified: trunk/libavformat/mp3.c
==============================================================================
--- trunk/libavformat/mp3.c (original)
+++ trunk/libavformat/mp3.c Fri Jul 11 09:41:11 2008
@@ -360,37 +360,6 @@ static int id3v1_parse_tag(AVFormatConte
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 @@ static int mp3_read_packet(AVFormatConte
}
#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)
More information about the ffmpeg-cvslog
mailing list