oggenc: remove unneeded null check.
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 4 Nov 2012 20:58:35 +0000 (21:58 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 4 Nov 2012 23:28:21 +0000 (00:28 +0100)
The code would have segfaulted before if it where null

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

index 1a0e4e3..2ff6704 100644 (file)
@@ -496,7 +496,7 @@ static int ogg_write_header(AVFormatContext *s)
         AVStream *st = s->streams[j];
         OGGStreamContext *oggstream = st->priv_data;
         for (i = 1; i < 3; i++) {
-            if (oggstream && oggstream->header_len[i])
+            if (oggstream->header_len[i])
                 ogg_buffer_data(s, st, oggstream->header[i],
                                 oggstream->header_len[i], 0, 1);
         }