]> git.sesse.net Git - ffmpeg/commitdiff
Revert "nuv: check per-frame header for validity."
authorJanne Grunau <janne-libav@jannau.net>
Mon, 6 Aug 2012 11:50:51 +0000 (13:50 +0200)
committerJanne Grunau <janne-libav@jannau.net>
Mon, 6 Aug 2012 12:33:50 +0000 (14:33 +0200)
The check is bogus since the nuv frameheader is already skipped
and the (decompressed) RTjpeg header is checked.

This reverts commit f6afacdb3b708720c9fb85984b4f7fdbca2b2036.

CC: libav-stable@libav.org
libavcodec/nuv.c

index 534fd03567dcc4290587cf771c9954c3b9345705..2e01602db782782f82b3dc581caa58e7866f3a54 100644 (file)
@@ -184,9 +184,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     }
     if (c->codec_frameheader) {
         int w, h, q;
-        if (buf[0] != 'V' || buf_size < 12) {
-            av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame (wrong codec_tag?)\n");
-            return AVERROR_INVALIDDATA;
+        if (buf_size < 12) {
+            av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame\n");
+            return -1;
         }
         w = AV_RL16(&buf[6]);
         h = AV_RL16(&buf[8]);