[FFmpeg-devel] [PATCH 1/8] Fix size of the temporary buffer used for audio in segafilm demuxer.

fenrir at elivagar.org fenrir at elivagar.org
Sat Sep 17 16:56:29 CEST 2011


From: Laurent Aimar <fenrir at videolan.org>

---
 libavformat/segafilm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index ff773ea..4bbacc5 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -255,8 +255,8 @@ static int film_read_packet(AVFormatContext *s,
         /* make sure the interleave buffer is large enough */
         if (sample->sample_size > film->stereo_buffer_size) {
             av_free(film->stereo_buffer);
-            film->stereo_buffer = av_malloc(film->stereo_buffer_size);
             film->stereo_buffer_size = sample->sample_size;
+            film->stereo_buffer = av_malloc(film->stereo_buffer_size);
             if (!film->stereo_buffer) {
                 film->stereo_buffer_size = 0;
                 return AVERROR(ENOMEM);
-- 
1.7.2.5



More information about the ffmpeg-devel mailing list