You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/roqvideoenc: clear freed pointers
Avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -936,8 +936,8 @@ static int roq_encode_video(RoqContext *enc)
|
|||||||
FFSWAP(motion_vect *, enc->last_motion4, enc->this_motion4);
|
FFSWAP(motion_vect *, enc->last_motion4, enc->this_motion4);
|
||||||
FFSWAP(motion_vect *, enc->last_motion8, enc->this_motion8);
|
FFSWAP(motion_vect *, enc->last_motion8, enc->this_motion8);
|
||||||
|
|
||||||
av_free(tempData->cel_evals);
|
av_freep(&tempData->cel_evals);
|
||||||
av_free(tempData->closest_cb2);
|
av_freep(&tempData->closest_cb2);
|
||||||
|
|
||||||
enc->framesSinceKeyframe++;
|
enc->framesSinceKeyframe++;
|
||||||
|
|
||||||
@@ -951,11 +951,11 @@ static av_cold int roq_encode_end(AVCodecContext *avctx)
|
|||||||
av_frame_free(&enc->current_frame);
|
av_frame_free(&enc->current_frame);
|
||||||
av_frame_free(&enc->last_frame);
|
av_frame_free(&enc->last_frame);
|
||||||
|
|
||||||
av_free(enc->tmpData);
|
av_freep(&enc->tmpData);
|
||||||
av_free(enc->this_motion4);
|
av_freep(&enc->this_motion4);
|
||||||
av_free(enc->last_motion4);
|
av_freep(&enc->last_motion4);
|
||||||
av_free(enc->this_motion8);
|
av_freep(&enc->this_motion8);
|
||||||
av_free(enc->last_motion8);
|
av_freep(&enc->last_motion8);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user