Skip to content

Commit

Permalink
fix mem leak of decode element while reconnecting
Browse files Browse the repository at this point in the history
Change-Id: Ic647eda40dba847d93fb84a2f074978f8034589b
  • Loading branch information
yizhou-xu committed Nov 27, 2024
1 parent a42be1b commit 5892a1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions element/multimedia/decode/src/ff_decode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,14 @@ int VideoDecFFM::openDec(bm_handle_t* dec_handle, const char* input) {

ret = avformat_open_input(&ifmt_ctx, input, NULL, &dict);
if (ret < 0) {
av_dict_free(&dict);
av_log(NULL, AV_LOG_ERROR, "Cannot open input file\n");
return ret;
}

ret = avformat_find_stream_info(ifmt_ctx, NULL);
if (ret < 0) {
av_dict_free(&dict);
av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
return ret;
}
Expand Down

0 comments on commit 5892a1c

Please sign in to comment.