You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: shorten: Extend fixed_coeffs to properly support pred_order 0 Conflicts: libavcodec/shorten.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -269,7 +269,8 @@ static int decode_wave_header(AVCodecContext *avctx, const uint8_t *header,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const int fixed_coeffs[3][3] = {
|
static const int fixed_coeffs[][3] = {
|
||||||
|
{ 0, 0, 0 },
|
||||||
{ 1, 0, 0 },
|
{ 1, 0, 0 },
|
||||||
{ 2, -1, 0 },
|
{ 2, -1, 0 },
|
||||||
{ 3, -3, 1 }
|
{ 3, -3, 1 }
|
||||||
@@ -298,7 +299,12 @@ static int decode_subframe_lpc(ShortenContext *s, int command, int channel,
|
|||||||
} else {
|
} else {
|
||||||
/* fixed LPC coeffs */
|
/* fixed LPC coeffs */
|
||||||
pred_order = command;
|
pred_order = command;
|
||||||
coeffs = fixed_coeffs[pred_order - 1];
|
if (pred_order > FF_ARRAY_ELEMS(fixed_coeffs)) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n",
|
||||||
|
pred_order);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
coeffs = fixed_coeffs[pred_order];
|
||||||
qshift = 0;
|
qshift = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user