summaryrefslogtreecommitdiffstats
path: root/libavformat/rtpenc_mpegts.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtpenc_mpegts.c')
-rw-r--r--libavformat/rtpenc_mpegts.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c
index 7af02e0..5f81e1a 100644
--- a/libavformat/rtpenc_mpegts.c
+++ b/libavformat/rtpenc_mpegts.c
@@ -85,6 +85,10 @@ static int rtp_mpegts_write_header(AVFormatContext *s)
}
rtp_ctx->oformat = rtp_format;
st = avformat_new_stream(rtp_ctx, NULL);
+ if (!st) {
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
st->time_base.num = 1;
st->time_base.den = 90000;
st->codecpar->codec_id = AV_CODEC_ID_MPEG2TS;
OpenPOWER on IntegriCloud