Browse Source

Fail more gracefully for multichannel wavpack in another container.

Originally committed as revision 26253 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Carl Eugen Hoyos 15 years ago
parent
commit
b82579a6ec
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/wavpack.c

+ 4
- 0
libavcodec/wavpack.c View File

@@ -660,6 +660,10 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx)
WavpackContext *s = avctx->priv_data;

s->avctx = avctx;
if (avctx->channels > 2) {
av_log(avctx, AV_LOG_ERROR, "Multichannel WavPack is not supported yet.\n");
return -1;
}
s->stereo = (avctx->channels == 2);
if(avctx->bits_per_coded_sample <= 16)
avctx->sample_fmt = AV_SAMPLE_FMT_S16;


Loading…
Cancel
Save