[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1605-gdfba525 |
Date: |
Fri, 15 Feb 2013 08:41:58 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via dfba5258dc230669a7e1ad309e25ef190c77e854 (commit)
from 4b3dae970549d42723c2528c250a1f95248145c7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=dfba5258dc230669a7e1ad309e25ef190c77e854
commit dfba5258dc230669a7e1ad309e25ef190c77e854
Author: Alexis Ballier <address@hidden>
Date: Thu Feb 14 16:54:08 2013 -0300
Fix build with libav-9 (#38333)
Signed-off-by: Sandro Santilli <address@hidden>
diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
index 5c8e1ad..50947fb 100644
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -133,12 +133,20 @@ void AudioDecoderFfmpeg::setup(SoundInfo& info)
}
}
+#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
+ _audioCodecCtx = avcodec_alloc_context3(_audioCodec);
+#else
_audioCodecCtx = avcodec_alloc_context();
+#endif
if (!_audioCodecCtx) {
throw MediaException(_("libavcodec couldn't allocate context"));
}
+#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
+ int ret = avcodec_open2(_audioCodecCtx, _audioCodec, NULL);
+#else
int ret = avcodec_open(_audioCodecCtx, _audioCodec);
+#endif
if (ret < 0) {
av_free(_audioCodecCtx);
_audioCodecCtx=0;
@@ -259,7 +267,11 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
_needsParsing = (_parser != NULL);
// Create an audioCodecCtx from the ffmpeg parser if exists/possible
+#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
+ _audioCodecCtx = avcodec_alloc_context3(_audioCodec);
+#else
_audioCodecCtx = avcodec_alloc_context();
+#endif
if (!_audioCodecCtx) {
throw MediaException(_("AudioDecoderFfmpeg: libavcodec couldn't "
"allocate context"));
@@ -310,7 +322,11 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
#ifdef GNASH_DEBUG_AUDIO_DECODING
log_debug(" Opening codec");
#endif // GNASH_DEBUG_AUDIO_DECODING
+#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
+ int ret = avcodec_open2(_audioCodecCtx, _audioCodec, NULL);
+#else
int ret = avcodec_open(_audioCodecCtx, _audioCodec);
+#endif
if (ret < 0) {
//avcodec_close(_audioCodecCtx);
av_free(_audioCodecCtx);
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
index eeefafe..e5263c6 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
@@ -183,7 +183,11 @@ VideoDecoderFfmpeg::init(enum CodecID codecId, int
/*width*/, int /*height*/,
throw MediaException(_("libavcodec can't decode this video format"));
}
+#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
+ _videoCodecCtx.reset(new
CodecContextWrapper(avcodec_alloc_context3(_videoCodec)));
+#else
_videoCodecCtx.reset(new CodecContextWrapper(avcodec_alloc_context()));
+#endif
if (!_videoCodecCtx->getContext()) {
throw MediaException(_("libavcodec couldn't allocate context"));
}
@@ -206,7 +210,11 @@ VideoDecoderFfmpeg::init(enum CodecID codecId, int
/*width*/, int /*height*/,
}
#endif
+#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(53,8,0)
+ int ret = avcodec_open2(ctx, _videoCodec, NULL);
+#else
int ret = avcodec_open(ctx, _videoCodec);
+#endif
if (ret < 0) {
boost::format msg = boost::format(_("libavcodec "
"failed to initialize FFMPEG "
-----------------------------------------------------------------------
Summary of changes:
libmedia/ffmpeg/AudioDecoderFfmpeg.cpp | 16 ++++++++++++++++
libmedia/ffmpeg/VideoDecoderFfmpeg.cpp | 8 ++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1605-gdfba525,
Sandro Santilli <=