]> git.sesse.net Git - ffmpeg/commitdiff
nutenc: only write an index if there are syncpoints
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 18 Feb 2013 19:51:54 +0000 (20:51 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 18 Feb 2013 19:51:54 +0000 (20:51 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nutenc.c

index 46711528a0425679eb1e41c0b59ead3df0a5405d..2d8d2652ee5403d141071a32fcd6f5fa38300187 100644 (file)
@@ -990,7 +990,7 @@ static int nut_write_trailer(AVFormatContext *s)
         write_headers(s, bc);
 
     ret = avio_open_dyn_buf(&dyn_bc);
-    if (ret >= 0) {
+    if (ret >= 0 && nut->sp_count) {
         write_index(nut, dyn_bc);
         put_packet(nut, bc, dyn_bc, 1, INDEX_STARTCODE);
     }