Skip to content
Snippets Groups Projects
Commit cf402d6f authored by Martin Storsjö's avatar Martin Storsjö
Browse files

rtpenc_mpegts: Set chain->rtp_ctx only after avformat_write_header succeeded


By making sure we at each time only have one pointer set, either a
local variable or one in the context, we avoid potential double frees
in the cleanup routines. If chain->rtp_ctx is set, it is closed by
calling avformat_write_trailer, but that shouldn't be called unless
avformat_write_header succeeded.

This issue was pointed out by Andreas Cadhalpun.

Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent c83dd2d2
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment