]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h263.c
Add checks on input/output buffers size for some audio decoders
[ffmpeg] / libavcodec / h263.c
index 3f513d27a920ea98fd8880aad5ad0368bfba42fa..3d4ba83863ffd68c525cd3588c4ebafed5b0ad69 100644 (file)
@@ -910,7 +910,7 @@ void mpeg4_encode_mb(MpegEncContext * s,
         int i, cbp;
 
         if(s->pict_type==B_TYPE){
-            static const int mb_type_table[8]= {-1, 2, 3, 1,-1,-1,-1, 0}; /* convert from mv_dir to type */
+            static const int mb_type_table[8]= {-1, 3, 2, 1,-1,-1,-1, 0}; /* convert from mv_dir to type */
             int mb_type=  mb_type_table[s->mv_dir];
 
             if(s->mb_x==0){
@@ -5077,7 +5077,7 @@ int h263_decode_picture_header(MpegEncContext *s)
             format = get_bits(&s->gb, 3);
             dprintf(s->avctx, "ufep=1, format: %d\n", format);
             s->custom_pcf= get_bits1(&s->gb);
-            s->umvplus = get_bits(&s->gb, 1); /* Unrestricted Motion Vector */
+            s->umvplus = get_bits1(&s->gb); /* Unrestricted Motion Vector */
             if (get_bits1(&s->gb) != 0) {
                 av_log(s->avctx, AV_LOG_ERROR, "Syntax-based Arithmetic Coding (SAC) not supported\n");
             }
@@ -6124,11 +6124,7 @@ int intel_h263_decode_picture_header(MpegEncContext *s)
         av_log(s->avctx, AV_LOG_ERROR, "SAC not supported\n");
         return -1;      /* SAC: off */
     }
-    if (get_bits1(&s->gb) != 0) {
-        s->obmc= 1;
-        av_log(s->avctx, AV_LOG_ERROR, "Advanced Prediction Mode not supported\n");
-//        return -1;      /* advanced prediction mode: off */
-    }
+    s->obmc= get_bits1(&s->gb);
     if (get_bits1(&s->gb) != 0) {
         av_log(s->avctx, AV_LOG_ERROR, "PB frame mode no supported\n");
         return -1;      /* PB frame mode */