Skip to content

transcoder_ffmpeg: fix memleak of encoder fmtCtx and filter_graph#144

Merged
JackLau1222 merged 1 commit intomasterfrom
fix_memleak
Feb 24, 2026
Merged

transcoder_ffmpeg: fix memleak of encoder fmtCtx and filter_graph#144
JackLau1222 merged 1 commit intomasterfrom
fix_memleak

Conversation

@JackLau1222
Copy link
Collaborator

  • Call avformat_free_context on encoder->fmtCtx in cleanup to free streams, codec contexts, codec parameters, and internal packets allocated by avformat_alloc_output_context2 and avformat_write_header
  • Free filter_graph in init_filter when an error occurs before it is assigned to filter_ctx->filter_graph

- Call avformat_free_context on encoder->fmtCtx in cleanup to free
  streams, codec contexts, codec parameters, and internal packets
  allocated by avformat_alloc_output_context2 and avformat_write_header
- Free filter_graph in init_filter when an error occurs before it is
  assigned to filter_ctx->filter_graph

Signed-off-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

@JackLau1222 JackLau1222 merged commit a5c994c into master Feb 24, 2026
11 checks passed
@JackLau1222 JackLau1222 deleted the fix_memleak branch February 24, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants