Commit a5c994c
transcoder_ffmpeg: fix memleak of encoder fmtCtx and 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>1 parent b70d9c0 commit a5c994c
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
544 | | - | |
545 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
546 | 550 | | |
547 | 551 | | |
548 | 552 | | |
| |||
0 commit comments