]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/svq1dec.c
h264: use the main H264Context as the parent for all slice contexts
[ffmpeg] / libavcodec / svq1dec.c
index 789a0132fbbc0cad8550d82aa5aefde7e3947fe9..909ace7b7f84086060f7b1d6c7a5049af072a824 100644 (file)
@@ -191,7 +191,7 @@ static int svq1_decode_block_intra(GetBitContext *bitbuf, uint8_t *pixels,
             continue;   /* skip vector */
         }
 
-        if (stages > 0 && level >= 4) {
+        if ((stages > 0 && level >= 4) || stages < 0) {
             av_dlog(NULL,
                     "Error (svq1_decode_block_intra): invalid vector: stages=%i level=%i\n",
                     stages, level);
@@ -253,7 +253,7 @@ static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels,
         if (stages == -1)
             continue;           /* skip vector */
 
-        if ((stages > 0) && (level >= 4)) {
+        if ((stages > 0 && level >= 4) || stages < 0) {
             av_dlog(NULL,
                     "Error (svq1_decode_block_non_intra): invalid vector: stages=%i level=%i\n",
                     stages, level);