]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpenc_mpegts.c
avformat/mpc8: do not return error on stream end
[ffmpeg] / libavformat / rtpenc_mpegts.c
index 7af02e0d2fba23290200c0db660f00bbee54d76a..5f81e1a14533ac3a8a71e9157654ebc7081d432e 100644 (file)
@@ -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;