avformat/nutenc: replace conditional by assert
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 29 May 2014 02:25:26 +0000 (04:25 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 29 May 2014 02:26:18 +0000 (04:26 +0200)
Its implied by sp_count==0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nutenc.c

index 9920a39..dfb7992 100644 (file)
@@ -1166,7 +1166,8 @@ static int nut_write_trailer(AVFormatContext *s)
         write_headers(s, bc);
 
     ret = avio_open_dyn_buf(&dyn_bc);
-    if (ret >= 0 && nut->sp_count && nut->write_index) {
+    if (ret >= 0 && nut->sp_count) {
+        av_assert1(nut->write_index);
         write_index(nut, dyn_bc);
         put_packet(nut, bc, dyn_bc, 1, INDEX_STARTCODE);
     }