summaryrefslogtreecommitdiff
path: root/libavcodec/pnm.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-28 05:54:59 +0100
committerJanne Grunau <janne-libav@jannau.net>2012-01-22 16:38:20 +0100
commit66b9d7065a5c01bcf6b5d5325fd9b9d4132e7e6f (patch)
tree6e698f87b153420d9ac5ba5404965c9de6f63e61 /libavcodec/pnm.c
parent20ea14d0f812d337950cbbe9600d47b07352ba5d (diff)
pam: Fix a typo that broke writing and reading PAM files.
Reported and reviewed by Derek Buitenhuis. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r--libavcodec/pnm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 54b55cfa53..f6e6d53ec9 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;