提交 afd1a2d8 编写于 作者: A Alan Curry 提交者: Roberto Togni

Fix buffer handling for stereo mace files, fixes some random sig11

Patch by Alan Curry !<! pacman !@! TheWorld !.! com !>!

Originally committed as revision 6178 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 2c00106c
......@@ -410,18 +410,18 @@ static int mace_decode_frame(AVCodecContext *avctx,
#ifdef DEBUG
puts("mace_decode_frame[3]()");
#endif
Exp1to3(c, buf, samples, buf_size / 2, avctx->channels, 1);
Exp1to3(c, buf, samples, buf_size / 2 / avctx->channels, avctx->channels, 1);
if (avctx->channels == 2)
Exp1to3(c, buf, samples+1, buf_size / 2, 2, 2);
Exp1to3(c, buf, samples+1, buf_size / 2 / 2, 2, 2);
*data_size = 2 * 3 * buf_size;
break;
case CODEC_ID_MACE6:
#ifdef DEBUG
puts("mace_decode_frame[6]()");
#endif
Exp1to6(c, buf, samples, buf_size, avctx->channels, 1);
Exp1to6(c, buf, samples, buf_size / avctx->channels, avctx->channels, 1);
if (avctx->channels == 2)
Exp1to6(c, buf, samples+1, buf_size, 2, 2);
Exp1to6(c, buf, samples+1, buf_size / 2, 2, 2);
*data_size = 2 * 6 * buf_size;
break;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册