Mercurial > libavformat.hg
comparison mmf.c @ 3560:507108c26477 libavformat
Move a function and an #ifdef CONFIG_MUXERS so that functions used only for
muxing get disabled when compiling with --disable-muxers.
author | diego |
---|---|
date | Fri, 11 Jul 2008 07:39:33 +0000 |
parents | ec4945b71d48 |
children | 457a89a670cf |
comparison
equal
deleted
inserted
replaced
3559:6edd87f61261 | 3560:507108c26477 |
---|---|
27 offset_t data_size; | 27 offset_t data_size; |
28 } MMFContext; | 28 } MMFContext; |
29 | 29 |
30 static int mmf_rates[] = { 4000, 8000, 11025, 22050, 44100 }; | 30 static int mmf_rates[] = { 4000, 8000, 11025, 22050, 44100 }; |
31 | 31 |
32 static int mmf_rate(int code) | |
33 { | |
34 if((code < 0) || (code > 4)) | |
35 return -1; | |
36 return mmf_rates[code]; | |
37 } | |
38 | |
39 #ifdef CONFIG_MUXERS | |
32 static int mmf_rate_code(int rate) | 40 static int mmf_rate_code(int rate) |
33 { | 41 { |
34 int i; | 42 int i; |
35 for(i = 0; i < 5; i++) | 43 for(i = 0; i < 5; i++) |
36 if(mmf_rates[i] == rate) | 44 if(mmf_rates[i] == rate) |
37 return i; | 45 return i; |
38 return -1; | 46 return -1; |
39 } | 47 } |
40 | 48 |
41 static int mmf_rate(int code) | |
42 { | |
43 if((code < 0) || (code > 4)) | |
44 return -1; | |
45 return mmf_rates[code]; | |
46 } | |
47 | |
48 #ifdef CONFIG_MUXERS | |
49 /* Copy of end_tag() from avienc.c, but for big-endian chunk size */ | 49 /* Copy of end_tag() from avienc.c, but for big-endian chunk size */ |
50 static void end_tag_be(ByteIOContext *pb, offset_t start) | 50 static void end_tag_be(ByteIOContext *pb, offset_t start) |
51 { | 51 { |
52 offset_t pos; | 52 offset_t pos; |
53 | 53 |