]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h263dec.c
tinfoil patch: accept no widths that are no multiples of 4
[ffmpeg] / libavcodec / h263dec.c
index ba105564f24d55ec7d4fc04d78712da0a01900db..b51ce5f0c46ac4c58dcd6962356c0cd47a40cbfe 100644 (file)
@@ -673,6 +673,10 @@ retry:
     if(s->last_picture_ptr==NULL && (s->pict_type==B_TYPE || s->dropable)) return get_consumed_bytes(s, buf_size);
     /* skip b frames if we are in a hurry */
     if(avctx->hurry_up && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size);
+    if(   (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==B_TYPE)
+       || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=I_TYPE)
+       ||  avctx->skip_frame >= AVDISCARD_ALL) 
+        return get_consumed_bytes(s, buf_size);
     /* skip everything if we are in a hurry>=5 */
     if(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size);