Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-04-18 03:12:05 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-04-18 04:18:50 +0300
commitd0b3922d24724cf31bcb1e979dbfb748b3cdd382 (patch)
treed897c71e83021df4ae19d16f5b05cc928ab4c19b /ffmpeg.c
parentfdd4922dc4896b97b17148744b5bd07e3301a027 (diff)
ffmpeg: Clear fifo pointer on deallocation
Not leaving stale pointers is more robust Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index e4b94b2fa0..143322c321 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -482,7 +482,7 @@ static void ffmpeg_cleanup(int ret)
sizeof(frame), NULL);
av_frame_free(&frame);
}
- av_fifo_free(fg->inputs[j]->frame_queue);
+ av_fifo_freep(&fg->inputs[j]->frame_queue);
if (fg->inputs[j]->ist->sub2video.sub_queue) {
while (av_fifo_size(fg->inputs[j]->ist->sub2video.sub_queue)) {
AVSubtitle sub;
@@ -490,7 +490,7 @@ static void ffmpeg_cleanup(int ret)
&sub, sizeof(sub), NULL);
avsubtitle_free(&sub);
}
- av_fifo_free(fg->inputs[j]->ist->sub2video.sub_queue);
+ av_fifo_freep(&fg->inputs[j]->ist->sub2video.sub_queue);
}
av_buffer_unref(&fg->inputs[j]->hw_frames_ctx);
av_freep(&fg->inputs[j]->name);