diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c index 5b94e73d82..b49ee818fb 100644 --- a/libavformat/rtpenc_mpegts.c +++ b/libavformat/rtpenc_mpegts.c @@ -98,7 +98,7 @@ static int rtp_mpegts_write_header(AVFormatContext *s) fail: if (mpegts_ctx) { - ffio_free_dyn_buf(&chain->mpegts_ctx->pb); + ffio_free_dyn_buf(&mpegts_ctx->pb); avformat_free_context(mpegts_ctx); } if (rtp_ctx)