1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

proper handling of samplesize

Originally committed as revision 3980 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Alex Beregszaszi 2005-02-25 11:15:12 +00:00
parent 19fe8b4100
commit 2f5132e7a8
2 changed files with 2 additions and 1 deletions

View File

@ -132,6 +132,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_INFO, "Unsupported audio codec (%x)\n", flags >> 4); av_log(s, AV_LOG_INFO, "Unsupported audio codec (%x)\n", flags >> 4);
st->codec.codec_tag= (flags >> 4); st->codec.codec_tag= (flags >> 4);
} }
st->codec.bits_per_sample = (flags & 2) ? 16 : 8;
} }
}else{ }else{
st->codec.codec_type = CODEC_TYPE_VIDEO; st->codec.codec_type = CODEC_TYPE_VIDEO;

View File

@ -35,7 +35,7 @@ static void put_be24(ByteIOContext *pb, int value)
} }
static int get_audio_flags(AVCodecContext *enc){ static int get_audio_flags(AVCodecContext *enc){
int flags = 0; int flags = (enc->bits_per_sample == 16) ? 0x2 : 0x0;
switch (enc->sample_rate) { switch (enc->sample_rate) {
case 44100: case 44100: