rtpdec_jpeg: Error out on other unsupported type values as well
authorMartin Storsjö <martin@martin.st>
Tue, 11 Sep 2012 11:42:22 +0000 (14:42 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 12 Sep 2012 09:10:56 +0000 (12:10 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec_jpeg.c

index 3f53887..944758d 100644 (file)
@@ -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) {