From 7d3fb3b6fdf1625d0813a9ab3028fbd6f91b0776 Mon Sep 17 00:00:00 2001 From: xufuji456 Date: Mon, 6 Jun 2022 14:49:11 +0800 Subject: [PATCH] retriever: release resource --- app/src/main/cpp/metadata/ffmpeg_media_retriever.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/src/main/cpp/metadata/ffmpeg_media_retriever.c b/app/src/main/cpp/metadata/ffmpeg_media_retriever.c index 76ff4af..09dd3a0 100755 --- a/app/src/main/cpp/metadata/ffmpeg_media_retriever.c +++ b/app/src/main/cpp/metadata/ffmpeg_media_retriever.c @@ -162,14 +162,11 @@ int set_data_source_inner(State **state_ptr, const char* path) { if (avformat_open_input(&state->pFormatCtx, path, NULL, &options) != 0) { LOGE("avformat_open_input fail..."); - *state_ptr = NULL; return FAILURE; } if (avformat_find_stream_info(state->pFormatCtx, NULL) < 0) { LOGE("avformat_find_stream_info fail..."); - avformat_close_input(&state->pFormatCtx); - *state_ptr = NULL; return FAILURE; }