Unified · Split
| @@ -52,7 +52,7 @@ static av_cold int wavarc_init(AVCodecContext *avctx) · 51 unmodified lines | ||
| 52 | 52 | { |
| 53 | 53 | WavArcContext *s = avctx->priv_data; |
| 54 | 54 | |
| 55 | − if (avctx->extradata_size < 44) | |
| 55 | + if (avctx->extradata_size < 52) | |
| 56 | 56 | return AVERROR_INVALIDDATA; |
| 57 | 57 | if (AV_RL32(avctx->extradata + 16) != MKTAG('R','I','F','F')) |
| 58 | 58 | return AVERROR_INVALIDDATA; |
| @@ -68,9 +68,9 @@ static av_cold int wavarc_init(AVCodecContext *avctx) · 9 unmodified lines | ||
| 68 | 68 | av_channel_layout_default(&avctx->ch_layout, AV_RL16(avctx->extradata + 38)); |
| 69 | 69 | avctx->sample_rate = AV_RL32(avctx->extradata + 40); |
| 70 | 70 | |
| 71 | − switch (AV_RL16(avctx->extradata + 38)) { | |
| 72 | − case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8P; break; | |
| 73 | − case 2: avctx->sample_fmt = AV_SAMPLE_FMT_S16P; break; | |
| 71 | + switch (AV_RL16(avctx->extradata + 50)) { | |
| 72 | + case 8: avctx->sample_fmt = AV_SAMPLE_FMT_U8P; break; | |
| 73 | + case 16: avctx->sample_fmt = AV_SAMPLE_FMT_S16P; break; | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | s->shift = 0; |