diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2005-02-25 11:15:12 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2005-02-25 11:15:12 +0000 |
commit | 2f5132e7a830a0057e8a17d6795b40879f815066 (patch) | |
tree | 0bf775ab0182fe4e88103d15c32a471bb6ede2bd /libavformat | |
parent | 19fe8b4100dfe0323e351e474c54293bb4ae576e (diff) | |
download | ffmpeg-2f5132e7a830a0057e8a17d6795b40879f815066.tar.gz |
proper handling of samplesize
Originally committed as revision 3980 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flvdec.c | 1 | ||||
-rw-r--r-- | libavformat/flvenc.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index f9f4fbe40b..ba024aec38 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -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); st->codec.codec_tag= (flags >> 4); } + st->codec.bits_per_sample = (flags & 2) ? 16 : 8; } }else{ st->codec.codec_type = CODEC_TYPE_VIDEO; diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 500d4220d7..a9a8730ee7 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -35,7 +35,7 @@ static void put_be24(ByteIOContext *pb, int value) } static int get_audio_flags(AVCodecContext *enc){ - int flags = 0; + int flags = (enc->bits_per_sample == 16) ? 0x2 : 0x0; switch (enc->sample_rate) { case 44100: |