mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-30 03:12:08 +00:00
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>
This commit is contained in:
commit
ebdae73125
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user