avformat/nutenc: Document trailer index assert better
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 14 Dec 2018 20:52:09 +0000 (21:52 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 21 Jan 2019 06:53:26 +0000 (07:53 +0100)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3a95b73abc868995b08ca2b4d8bbf2cda43184f8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/nutenc.c

index a92ff55..e9a3bb4 100644 (file)
@@ -1172,7 +1172,7 @@ static int nut_write_trailer(AVFormatContext *s)
 
     ret = avio_open_dyn_buf(&dyn_bc);
     if (ret >= 0 && nut->sp_count) {
-        av_assert1(nut->write_index);
+        av_assert1(nut->write_index); // sp_count should be 0 if no index is going to be written
         write_index(nut, dyn_bc);
         put_packet(nut, bc, dyn_bc, 1, INDEX_STARTCODE);
     }