[FFmpeg-cvslog] hwcontext: Perform usual uninitialisation on derived frames contexts
Mark Thompson
git at videolan.org
Tue Feb 13 01:00:35 EET 2018
ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Mon Jun 26 20:28:07 2017 +0100| [e412d683fe0349bb8450645813a23158bb4ebd66] | committer: Mark Thompson
hwcontext: Perform usual uninitialisation on derived frames contexts
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e412d683fe0349bb8450645813a23158bb4ebd66
---
libavutil/hwcontext.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index cccbd6234e..34fb720a75 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -205,19 +205,16 @@ static void hwframe_ctx_free(void *opaque, uint8_t *data)
{
AVHWFramesContext *ctx = (AVHWFramesContext*)data;
- if (ctx->internal->source_frames) {
- av_buffer_unref(&ctx->internal->source_frames);
+ if (ctx->internal->pool_internal)
+ av_buffer_pool_uninit(&ctx->internal->pool_internal);
- } else {
- if (ctx->internal->pool_internal)
- av_buffer_pool_uninit(&ctx->internal->pool_internal);
+ if (ctx->internal->hw_type->frames_uninit)
+ ctx->internal->hw_type->frames_uninit(ctx);
- if (ctx->internal->hw_type->frames_uninit)
- ctx->internal->hw_type->frames_uninit(ctx);
+ if (ctx->free)
+ ctx->free(ctx);
- if (ctx->free)
- ctx->free(ctx);
- }
+ av_buffer_unref(&ctx->internal->source_frames);
av_buffer_unref(&ctx->device_ref);
More information about the ffmpeg-cvslog
mailing list