This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
set proper bits_per_sample value for ADPCM codecs
Originally committed as revision 5666 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Aurelien Jacobs
19 years ago
parent
ab7e315396
commit
f1b163e01e
2 changed files
with
5 additions
and
3 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-2
libavcodec/utils.c
+1
-1
libavformat/utils.c
+ 4
- 2
libavcodec/utils.c
View File
@@ -1306,11 +1306,13 @@ char av_get_pict_type_char(int pict_type){
int av_get_bits_per_sample(enum CodecID codec_id){
switch(codec_id){
case CODEC_ID_ADPCM_CT:
case CODEC_ID_ADPCM_SBPRO_2:
return 2;
case CODEC_ID_ADPCM_SBPRO_3:
return 3;
case CODEC_ID_ADPCM_SBPRO_4:
return 0;
case CODEC_ID_ADPCM_CT:
return 4;
case CODEC_ID_PCM_ALAW:
case CODEC_ID_PCM_MULAW:
case CODEC_ID_PCM_S8:
+ 1
- 1
libavformat/utils.c
View File
@@ -658,7 +658,7 @@ static int get_audio_frame_size(AVCodecContext *enc, int size)
if (bits_per_sample) {
if (enc->channels == 0)
return -1;
frame_size = size /
(
(bits_per_sample
>> 3)
* enc->channels);
frame_size =
(
size
<< 3)
/ (bits_per_sample * enc->channels);
} else {
/* used for example by ADPCM codecs */
if (enc->bit_rate == 0)
Write
Preview
Loading…
Cancel
Save