summaryrefslogtreecommitdiff
path: root/libavformat/flvdec.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2008-09-08 14:24:59 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-09-08 14:24:59 +0000
commitdd1c8f3e6e5380f993c86750bb09fd42e130143f (patch)
tree2ae5b2bbda1b685069f4db6ed408097288590dde /libavformat/flvdec.c
parent71375e05006e68fecdeb8d5fa80c3cce52a5cf86 (diff)
Bump Major version, this commit is almost just renaming bits_per_sample to
bits_per_coded_sample but that cannot be done seperately. Patch by Luca Abeni Also reset the minor version and fix the forgotton change to libfaad. Note: The API/ABI should not be considered stable yet, there still may be a change done here or there if some developer has some cleanup ideas and patches! Originally committed as revision 15262 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r--libavformat/flvdec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index ff6f98106d..e548fb4a85 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -42,7 +42,7 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, int flv_c
switch(flv_codecid) {
//no distinction between S16 and S8 PCM codec flags
case FLV_CODECID_PCM:
- acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 :
+ acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_S8 :
#ifdef WORDS_BIGENDIAN
CODEC_ID_PCM_S16BE;
#else
@@ -50,7 +50,7 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, int flv_c
#endif
break;
case FLV_CODECID_PCM_LE:
- acodec->codec_id = acodec->bits_per_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16LE; break;
+ acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_S8 : CODEC_ID_PCM_S16LE; break;
case FLV_CODECID_AAC : acodec->codec_id = CODEC_ID_AAC; break;
case FLV_CODECID_ADPCM: acodec->codec_id = CODEC_ID_ADPCM_SWF; break;
case FLV_CODECID_SPEEX: acodec->codec_id = CODEC_ID_SPEEX; break;
@@ -185,7 +185,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
else if(!strcmp(key, "videocodecid") && vcodec && 0 <= (int)num_val)
flv_set_video_codec(s, vstream, (int)num_val);
else if(!strcmp(key, "audiosamplesize") && acodec && 0 < (int)num_val) {
- acodec->bits_per_sample = num_val;
+ acodec->bits_per_coded_sample = num_val;
//we may have to rewrite a previously read codecid because FLV only marks PCM endianness.
if(num_val == 8 && (acodec->codec_id == CODEC_ID_PCM_S16BE || acodec->codec_id == CODEC_ID_PCM_S16LE))
acodec->codec_id = CODEC_ID_PCM_S8;
@@ -382,13 +382,13 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
}
if(is_audio){
- if(!st->codec->sample_rate || !st->codec->bits_per_sample || (!st->codec->codec_id && !st->codec->codec_tag)) {
+ if(!st->codec->sample_rate || !st->codec->bits_per_coded_sample || (!st->codec->codec_id && !st->codec->codec_tag)) {
st->codec->channels = (flags & FLV_AUDIO_CHANNEL_MASK) == FLV_STEREO ? 2 : 1;
if((flags & FLV_AUDIO_CODECID_MASK) == FLV_CODECID_NELLYMOSER_8HZ_MONO)
st->codec->sample_rate= 8000;
else
st->codec->sample_rate = (44100 << ((flags & FLV_AUDIO_SAMPLERATE_MASK) >> FLV_AUDIO_SAMPLERATE_OFFSET) >> 3);
- st->codec->bits_per_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8;
+ st->codec->bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8;
flv_set_audio_codec(s, st, flags & FLV_AUDIO_CODECID_MASK);
}
}else{