Commit ea603bc8 authored by rtogni's avatar rtogni

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

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6178 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bff95aba
...@@ -410,18 +410,18 @@ static int mace_decode_frame(AVCodecContext *avctx, ...@@ -410,18 +410,18 @@ static int mace_decode_frame(AVCodecContext *avctx,
#ifdef DEBUG #ifdef DEBUG
puts("mace_decode_frame[3]()"); puts("mace_decode_frame[3]()");
#endif #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) 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; *data_size = 2 * 3 * buf_size;
break; break;
case CODEC_ID_MACE6: case CODEC_ID_MACE6:
#ifdef DEBUG #ifdef DEBUG
puts("mace_decode_frame[6]()"); puts("mace_decode_frame[6]()");
#endif #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) 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; *data_size = 2 * 6 * buf_size;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment