Simplify condition.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 7 May 2011 07:47:35 +0000 (09:47 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 7 May 2011 07:47:35 +0000 (09:47 +0200)
libavformat/nutenc.c

index b5c5c7e..4756ca2 100644 (file)
@@ -589,7 +589,7 @@ static int write_header(AVFormatContext *s){
     nut->chapter  = av_mallocz(sizeof(ChapterContext)*s->nb_chapters);
     nut->time_base= av_mallocz(sizeof(AVRational   )*(s->nb_streams +
                                                       s->nb_chapters));
-    if (!nut->stream || (s->nb_chapters && !nut->chapter) || !nut->time_base) {
+    if (!nut->stream || !nut->chapter || !nut->time_base) {
         av_freep(&nut->stream);
         av_freep(&nut->chapter);
         av_freep(&nut->time_base);