]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ivfenc.c
avformat/mpegtsenc: Fix multi program so that it supports adding the same stream...
[ffmpeg] / libavformat / ivfenc.c
index 2053c509f9f1b53c16f9367f2d29b375db880ebf..484d87d093d37871dd55d2b8008edd0abfae4ed6 100644 (file)
@@ -72,8 +72,9 @@ static int ivf_write_packet(AVFormatContext *s, AVPacket *pkt)
 static int ivf_write_trailer(AVFormatContext *s)
 {
     AVIOContext *pb = s->pb;
-    if (pb->seekable) {
-        IVFEncContext *ctx = s->priv_data;
+    IVFEncContext *ctx = s->priv_data;
+
+    if (pb->seekable && ctx->frame_cnt > 1) {
         size_t end = avio_tell(pb);
 
         avio_seek(pb, 24, SEEK_SET);