From c3bcd22ed3f843f7240fa190df8f3daa2081290f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 11 Sep 2012 14:42:22 +0300 Subject: [PATCH] rtpdec_jpeg: Error out on other unsupported type values as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtpdec_jpeg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c index 3f53887798..944758d4fc 100644 --- a/libavformat/rtpdec_jpeg.c +++ b/libavformat/rtpdec_jpeg.c @@ -246,6 +246,10 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg, "Unimplemented RTP/JPEG restart marker header.\n"); return AVERROR_PATCHWELCOME; } + if (type > 1) { + av_log(ctx, AV_LOG_ERROR, "Unimplemented RTP/JPEG type %d\n", type); + return AVERROR_PATCHWELCOME; + } /* Parse the quantization table header. */ if (off == 0) {