diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-24 01:01:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-24 01:01:21 +0200 |
commit | 2b0cdb7364fbe1e8a7e97d36ba36dc67fb24095e (patch) | |
tree | 696306b4a66d7598f2795f9fbae4557135ff9104 /libavcodec/wavpack.c | |
parent | 42d44ec306d0656ace5cea63867f70fa686141cb (diff) | |
parent | 16ad77b357ebbe74a7bc9568904c328a2722651e (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
Move id3v2 tag writing to a separate file.
swscale: add missing colons to x86 assembly yuv2planeX.
g722: split decoder and encoder into separate files
cosmetics: remove extra spaces before end-of-statement semi-colons
vorbisdec: check output buffer size before writing output
wavpack: calculate bpp using av_get_bytes_per_sample()
ac3enc: Set max value for mode options correctly
lavc: move get_b_cbp() from h263.h to mpeg4videoenc.c
mpeg12: move closed_gop from MpegEncContext to Mpeg1Context
mpeg12: move full_pel from MpegEncContext to Mpeg1Context
mpeg12: move Mpeg1Context from mpeg12.c to mpeg12.h
mpegvideo: remove some unused variables from MpegEncContext.
Conflicts:
libavcodec/mpeg12.c
libavformat/mp3enc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r-- | libavcodec/wavpack.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 0a0d8ab23e..5ff9795ef8 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -808,15 +808,13 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, } s->frame_flags = AV_RL32(buf); buf += 4; if(s->frame_flags&0x80){ - bpp = sizeof(float); avctx->sample_fmt = AV_SAMPLE_FMT_FLT; } else if((s->frame_flags&0x03) <= 1){ - bpp = 2; avctx->sample_fmt = AV_SAMPLE_FMT_S16; } else { - bpp = 4; avctx->sample_fmt = AV_SAMPLE_FMT_S32; } + bpp = av_get_bytes_per_sample(avctx->sample_fmt); samples = (uint8_t*)samples + bpp * wc->ch_offset; s->stereo = !(s->frame_flags & WV_MONO); |