1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

lavc/pnmdec: Fix 16bit decoding.

Regression since cdb5479c
Reported by irc user tTh from Mixart-Myrys
This commit is contained in:
Carl Eugen Hoyos 2019-12-13 19:10:15 +01:00
parent 24424a6516
commit 193143486e

View File

@ -143,7 +143,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
v = (*s->bytestream++)&1;
} else {
/* read a sequence of digits */
for (k = 0; k < 5 && c <= 9; k += 1) {
for (k = 0; k < 6 && c <= 9; k += 1) {
v = 10*v + c;
c = (*s->bytestream++) - '0';
}