# HG changeset patch # User gpoirier # Date 1184860616 0 # Node ID 4cac2cfe2745bdb7fe60d00e1c49b951cb78980b # Parent 389366aa3458589d9014c416026f2f6967f5cbca bail out on unknown jpeg pixel format instead of silently decoding data incorrectly patch by Andreas ªÓman % andreas A olebyn P nu % Original thread: date: Jul 19, 2007 4:50 PM subject: [FFmpeg-devel] [PATCH] bail out on unknown jpeg pixel format diff -r 389366aa3458 -r 4cac2cfe2745 mjpegdec.c --- a/mjpegdec.c Thu Jul 19 08:47:07 2007 +0000 +++ b/mjpegdec.c Thu Jul 19 15:56:56 2007 +0000 @@ -305,10 +305,12 @@ case 0x221212: s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV422P : PIX_FMT_YUVJ422P; break; - default: case 0x221111: s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV420P : PIX_FMT_YUVJ420P; break; + default: + av_log(s->avctx, AV_LOG_ERROR, "Unhandled pixel format 0x%x\n", pix_fmt_id); + return -1; } if(s->ls){ if(s->nb_components > 1)