[FFmpeg-cvslog] oggenc: remove unneeded null check.

Michael Niedermayer git at videolan.org
Mon Nov 5 00:29:26 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov  4 21:58:35 2012 +0100| [a147c1b2b125c26cd2c5105a7f274a597de37731] | committer: Michael Niedermayer

oggenc: remove unneeded null check.

The code would have segfaulted before if it where null

Fixes CID732218
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a147c1b2b125c26cd2c5105a7f274a597de37731
---

 libavformat/oggenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 1a0e4e3..2ff6704 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -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);
         }



More information about the ffmpeg-cvslog mailing list