]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/error_resilience.c
fraps: Make the input buffer size checks more strict
[ffmpeg] / libavcodec / error_resilience.c
index 78921e3fcff3e84baca198d5e26fcbe26fbf648e..a07787a3aedefeae4f21471c164952abc1dfc60e 100644 (file)
@@ -219,7 +219,7 @@ static void h_block_filter(ERContext *s, uint8_t *dst, int w,
                            int h, int stride, int is_luma)
 {
     int b_x, b_y, mvx_stride, mvy_stride;
-    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
+    const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
     set_mv_strides(s, &mvx_stride, &mvy_stride);
     mvx_stride >>= is_luma;
     mvy_stride *= mvx_stride;
@@ -287,7 +287,7 @@ static void v_block_filter(ERContext *s, uint8_t *dst, int w, int h,
                            int stride, int is_luma)
 {
     int b_x, b_y, mvx_stride, mvy_stride;
-    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
+    const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
     set_mv_strides(s, &mvx_stride, &mvy_stride);
     mvx_stride >>= is_luma;
     mvy_stride *= mvx_stride;
@@ -824,7 +824,6 @@ void ff_er_frame_end(ERContext *s)
      * though it should not crash if enabled. */
     if (!s->avctx->err_recognition || s->error_count == 0              ||
         s->avctx->hwaccel                                              ||
-        s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU          ||
         !s->cur_pic || s->cur_pic->field_picture                               ||
         s->error_count == 3 * s->mb_width *
                           (s->avctx->skip_top + s->avctx->skip_bottom)) {
@@ -851,7 +850,6 @@ void ff_er_frame_end(ERContext *s)
             }
             return;
         }
-        s->cur_pic->f.motion_subsample_log2 = 3;
     }
 
     if (s->avctx->debug & FF_DEBUG_ER) {