X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Fsnow.c;h=83db3c7195606c16e30259e3f80928cd2dc90259;hp=5660eba90da571a3d8412dc7da0a2c7ce9b4b775;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavcodec/snow.c b/ffmpeg/libavcodec/snow.c index 5660eba..83db3c7 100644 --- a/ffmpeg/libavcodec/snow.c +++ b/ffmpeg/libavcodec/snow.c @@ -324,7 +324,7 @@ static void mc_block(Plane *p, uint8_t *dst, const uint8_t *src, int stride, int } } -void ff_snow_pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, ptrdiff_t stride, int sx, int sy, int b_w, int b_h, BlockNode *block, int plane_index, int w, int h){ +void ff_snow_pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, ptrdiff_t stride, int sx, int sy, int b_w, int b_h, const BlockNode *block, int plane_index, int w, int h){ if(block->type & BLOCK_INTRA){ int x, y; const unsigned color = block->color[plane_index]; @@ -637,8 +637,10 @@ void ff_snow_release_buffer(AVCodecContext *avctx) if(s->last_picture[s->max_ref_frames-1]->data[0]){ av_frame_unref(s->last_picture[s->max_ref_frames-1]); for(i=0; i<9; i++) - if(s->halfpel_plane[s->max_ref_frames-1][1+i/3][i%3]) + if(s->halfpel_plane[s->max_ref_frames-1][1+i/3][i%3]) { av_free(s->halfpel_plane[s->max_ref_frames-1][1+i/3][i%3] - EDGE_WIDTH*(1+s->current_picture->linesize[i%3])); + s->halfpel_plane[s->max_ref_frames-1][1+i/3][i%3] = NULL; + } } }