diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-10 11:17:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-10 11:17:37 +0100 |
commit | ebdae73125bd8fb71be72a5d9ae64c6fc7ccc130 (patch) | |
tree | b71950eb62a365aa5be92b57fc1b4ad845be45b3 /libavformat | |
parent | 967afad03b3b6a1987c5c3079777657fde11e8c9 (diff) | |
parent | cf402d6fa88acd647cdff993429583bec8a34fdc (diff) | |
download | ffmpeg-ebdae73125bd8fb71be72a5d9ae64c6fc7ccc130.tar.gz |
Merge commit 'cf402d6fa88acd647cdff993429583bec8a34fdc'
* commit 'cf402d6fa88acd647cdff993429583bec8a34fdc':
rtpenc_mpegts: Set chain->rtp_ctx only after avformat_write_header succeeded
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtpenc_mpegts.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c index b49ee818fb..db1680e069 100644 --- a/libavformat/rtpenc_mpegts.c +++ b/libavformat/rtpenc_mpegts.c @@ -88,11 +88,10 @@ static int rtp_mpegts_write_header(AVFormatContext *s) st->time_base.num = 1; st->time_base.den = 90000; st->codec->codec_id = AV_CODEC_ID_MPEG2TS; - chain->rtp_ctx = rtp_ctx; rtp_ctx->pb = s->pb; if ((ret = avformat_write_header(rtp_ctx, NULL)) < 0) goto fail; - rtp_ctx = NULL; + chain->rtp_ctx = rtp_ctx; return 0; |