[FFmpeg-cvslog] lavc/pnmdec: Fix 16bit decoding.
Carl Eugen Hoyos
git at videolan.org
Sat Dec 14 10:50:24 EET 2019
ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Fri Dec 13 19:10:15 2019 +0100| [193143486e8a7b1108147b1ea44134b5a80e5e17] | committer: Carl Eugen Hoyos
lavc/pnmdec: Fix 16bit decoding.
Regression since cdb5479c
Reported by irc user tTh from Mixart-Myrys
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=193143486e8a7b1108147b1ea44134b5a80e5e17
---
libavcodec/pnmdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index 958c5e43b0..dbcaef3884 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -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';
}
More information about the ffmpeg-cvslog
mailing list