OSDN Git Service

intelh263dec: fix "Strict H.263 compliance" file playback
authorAnton Khirnov <anton@khirnov.net>
Thu, 9 Jun 2011 20:29:40 +0000 (22:29 +0200)
committerAnton Khirnov <anton@khirnov.net>
Thu, 9 Jun 2011 20:53:17 +0000 (22:53 +0200)
fixes issue2449

patch submitted by xvid_fan freenet de

libavcodec/intelh263dec.c

index c3d4d26..b60608c 100644 (file)
@@ -46,7 +46,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
     skip_bits1(&s->gb);         /* freeze picture release off */
 
     format = get_bits(&s->gb, 3);
-    if (format != 7) {
+    if (format == 0 || format == 6) {
         av_log(s->avctx, AV_LOG_ERROR, "Intel H263 free format not supported\n");
         return -1;
     }
@@ -64,7 +64,10 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
     s->obmc= get_bits1(&s->gb);
     s->pb_frame = get_bits1(&s->gb);
 
-    if(format == 7){
+    if (format < 6) {
+        s->width = h263_format[format][0];
+        s->height = h263_format[format][1];
+    } else {
         format = get_bits(&s->gb, 3);
         if(format == 0 || format == 7){
             av_log(s->avctx, AV_LOG_ERROR, "Wrong Intel H263 format\n");