From 66b9d7065a5c01bcf6b5d5325fd9b9d4132e7e6f Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Wed, 28 Dec 2011 05:54:59 +0100 Subject: pam: Fix a typo that broke writing and reading PAM files. Reported and reviewed by Derek Buitenhuis. Signed-off-by: Janne Grunau --- libavcodec/pnm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavcodec/pnm.c') diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 54b55cf..f6e6d53 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -93,7 +93,9 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) } else if (!strcmp(buf1, "MAXVAL")) { pnm_get(s, buf1, sizeof(buf1)); maxval = strtol(buf1, NULL, 10); - } else if (!strcmp(buf1, "TUPLETYPE")) { + } else if (!strcmp(buf1, "TUPLTYPE") || + /* libavcodec used to write invalid files */ + !strcmp(buf1, "TUPLETYPE")) { pnm_get(s, tuple_type, sizeof(tuple_type)); } else if (!strcmp(buf1, "ENDHDR")) { break; -- cgit v1.1