[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: |
Gabriele Giacone |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1756-gc11d519 |
Date: |
Tue, 20 Aug 2013 19:02:07 +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 c11d5195364aae2f4434fb19ece3b56eb250f215 (commit)
from f89a56139b47ae1b88bf849346c9b54a5d3dc6a9 (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=c11d5195364aae2f4434fb19ece3b56eb250f215
commit c11d5195364aae2f4434fb19ece3b56eb250f215
Author: Gabriele Giacone <address@hidden>
Date: Tue Aug 20 21:00:12 2013 +0200
Fix warnings: deprecated {get,reget,release}_buffer in ffmpeg 2.0.
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
index 1a74971..5c850b8 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
@@ -53,9 +53,13 @@ namespace {
void clear_vaapi_context(AVCodecContext* avctx);
void reset_context(AVCodecContext* avctx, VaapiContextFfmpeg* vactx = 0);
PixelFormat get_format(AVCodecContext* avctx, const PixelFormat* fmt);
+#if LIBAVCODEC_VERSION_MAJOR >= 55
+ int get_buffer(AVCodecContext* avctx, AVFrame* pic, int flags);
+#else
int get_buffer(AVCodecContext* avctx, AVFrame* pic);
int reget_buffer(AVCodecContext* avctx, AVFrame* pic);
- void release_buffer(AVCodecContext *avctx, AVFrame *pic);
+ void release_buffer(AVCodecContext* avctx, AVFrame* pic);
+#endif
}
#ifdef HAVE_SWSCALE_H
@@ -198,9 +202,13 @@ VideoDecoderFfmpeg::init(enum CODECID codecId, int
/*width*/, int /*height*/,
ctx->extradata_size = extradataSize;
ctx->get_format = get_format;
+#if LIBAVCODEC_VERSION_MAJOR >= 55
+ ctx->get_buffer2 = get_buffer;
+#else
ctx->get_buffer = get_buffer;
ctx->reget_buffer = reget_buffer;
ctx->release_buffer = release_buffer;
+#endif
#ifdef HAVE_VA_VA_H
if (vaapi_is_enabled()) {
@@ -525,10 +533,18 @@ get_format(AVCodecContext* avctx, const PixelFormat* fmt)
/// AVCodecContext.get_buffer() implementation
int
+#if LIBAVCODEC_VERSION_MAJOR >= 55
+get_buffer(AVCodecContext* avctx, AVFrame* pic, int flags)
+#else
get_buffer(AVCodecContext* avctx, AVFrame* pic)
+#endif
{
VaapiContextFfmpeg* const vactx = get_vaapi_context(avctx);
+#if LIBAVCODEC_VERSION_MAJOR >= 55
+ if (!vactx) return avcodec_default_get_buffer2(avctx, pic, flags);
+#else
if (!vactx) return avcodec_default_get_buffer(avctx, pic);
+#endif
#ifdef HAVE_VA_VA_H
if (!vactx->initDecoder(avctx->width, avctx->height)) return -1;
@@ -551,6 +567,7 @@ get_buffer(AVCodecContext* avctx, AVFrame* pic)
return -1;
}
+#if LIBAVCODEC_VERSION_MAJOR < 55
/// AVCodecContext.reget_buffer() implementation
int
reget_buffer(AVCodecContext* avctx, AVFrame* pic)
@@ -582,6 +599,7 @@ release_buffer(AVCodecContext *avctx, AVFrame *pic)
pic->data[3] = NULL;
#endif
}
+#endif
}
-----------------------------------------------------------------------
Summary of changes:
libmedia/ffmpeg/VideoDecoderFfmpeg.cpp | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 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-1756-gc11d519,
Gabriele Giacone <=