mxg: fix compiler warning for uninitialized variables
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 31 Dec 2011 15:51:35 +0000 (16:51 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 31 Dec 2011 16:15:31 +0000 (17:15 +0100)
Based on work by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mxg.c

index b249f67..3e0c421 100644 (file)
@@ -104,7 +104,7 @@ static int mxg_update_cache(AVFormatContext *s, unsigned int cache_size)
     /* reallocate internal buffer */
     if (current_pos > current_pos + cache_size)
         return AVERROR(ENOMEM);
-    if (mxg->soi_ptr) soi_pos = mxg->soi_ptr - mxg->buffer;
+    soi_pos = mxg->soi_ptr - mxg->buffer;
     mxg->buffer = av_fast_realloc(mxg->buffer, &mxg->buffer_size,
                                   current_pos + cache_size +
                                   FF_INPUT_BUFFER_PADDING_SIZE);