From: Michael Niedermayer Date: Mon, 18 Feb 2013 19:51:54 +0000 (+0100) Subject: nutenc: only write an index if there are syncpoints X-Git-Tag: n1.2~365 X-Git-Url: https://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=e39821a65e42722e81bf53bb44237f9bf8e4ce07 nutenc: only write an index if there are syncpoints Signed-off-by: Michael Niedermayer --- diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 46711528a0..2d8d2652ee 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -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); }