diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-16 23:34:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-16 23:48:38 +0100 |
commit | 7ababb85f963c3354fb10000742c6857bb1198ed (patch) | |
tree | 706714b60034146dc3903cee912a6227a0c7ecd3 /libavcodec/snow.c | |
parent | 00672d2ce5135ccc165f327ad70aa9f4f6cfc0ec (diff) | |
download | ffmpeg-7ababb85f963c3354fb10000742c6857bb1198ed.tar.gz |
avcodec/snow: clear freed pointers
Avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r-- | libavcodec/snow.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 3701707787..83db3c7195 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -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; + } } } |