From 5b93b4477e61e42e4f5cc9a938bf8b1f06145d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 22 Mar 2012 01:20:06 +0100 Subject: [PATCH] ffmpeg: updated gcc2 package and fixed crashes on exit. * replaced calls to free() with calls to av_free(). * updated gcc2 package to disable SSE and a few options like we had before with 0.6. --- build/jam/OptionalBuildFeatures | 2 +- src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp | 6 +++--- src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/jam/OptionalBuildFeatures b/build/jam/OptionalBuildFeatures index 8c6a5ad65a..40727bc37a 100644 --- a/build/jam/OptionalBuildFeatures +++ b/build/jam/OptionalBuildFeatures @@ -222,7 +222,7 @@ if $(TARGET_ARCH) = x86 { HAIKU_LIBOGG_FILE = libogg-1.3.0-x86-gcc4-2012-03-12.zip ; HAIKU_LIBVPX_FILE = libvpx-1.0.0-x86-gcc4-2012-03-14.zip ; } else { - HAIKU_FFMPEG_FILE = ffmpeg-0.10-x86-gcc2-2012-03-19.zip ; + HAIKU_FFMPEG_FILE = ffmpeg-0.10-x86-gcc2-2012-03-22.zip ; HAIKU_SPEEX_FILE = speex-1.2rc1-x86-gcc2-2012-03-11.zip ; HAIKU_LIBTHEORA_FILE = libtheora-1.1.1-x86-gcc2-2012-03-11.zip ; HAIKU_LIBVORBIS_FILE = libvorbis-1.3.2-x86-gcc2-2012-03-11.zip ; diff --git a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp index eebc583b82..9a1e0d3b9e 100644 --- a/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp +++ b/src/add-ons/media/plugins/ffmpeg/AVCodecDecoder.cpp @@ -127,9 +127,9 @@ AVCodecDecoder::~AVCodecDecoder() if (fCodecInitDone) avcodec_close(fContext); - free(fOutputPicture); - free(fInputPicture); - free(fContext); + av_free(fOutputPicture); + av_free(fInputPicture); + av_free(fContext); #if USE_SWS_FOR_COLOR_SPACE_CONVERSION if (fSwsContext != NULL) diff --git a/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp b/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp index 42804be611..58b26cc946 100644 --- a/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp +++ b/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp @@ -106,10 +106,10 @@ AVCodecEncoder::~AVCodecEncoder() fFrame->linesize[1] = 0; fFrame->linesize[2] = 0; fFrame->linesize[3] = 0; - free(fFrame); + av_free(fFrame); } - free(fOwnContext); + av_free(fOwnContext); delete[] fChunkBuffer; }