From 40a3686fe0a4d0033861ff9bb86ea8b6b2ed3771 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 22 Jan 2008 17:16:12 +0000 Subject: [PATCH] ext/ffmpeg/gstffmpegdec.c: Disable direct rendering for h264 since it does not always work. Original commit message from CVS: * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_setcaps), (gst_ffmpegdec_get_buffer): Disable direct rendering for h264 since it does not always work. --- ChangeLog | 6 ++++++ ext/ffmpeg/gstffmpegdec.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 757b76b..7eb1aac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-01-22 Wim Taymans + * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_setcaps), + (gst_ffmpegdec_get_buffer): + Disable direct rendering for h264 since it does not always work. + +2008-01-22 Wim Taymans + * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_set_property), (gst_ffmpegdec_get_property): Implement get/set for the new property too. diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 89e367b..af24446 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -641,6 +641,9 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps) if (!oclass->in_plugin->capabilities & CODEC_CAP_DR1) { GST_DEBUG_OBJECT (ffmpegdec, "direct rendering not supported"); } + if (oclass->in_plugin->id == CODEC_ID_H264) { + GST_DEBUG_OBJECT (ffmpegdec, "direct rendering disabled for H264"); + } else { GST_DEBUG_OBJECT (ffmpegdec, "enabled direct rendering"); /* do *not* draw edges when in direct rendering, for some reason it draws @@ -759,7 +762,7 @@ gst_ffmpegdec_get_buffer (AVCodecContext * context, AVFrame * picture) /* tell ffmpeg we own this buffer, tranfer the ref we have on the buffer to * the opaque data. */ picture->type = FF_BUFFER_TYPE_USER; - picture->age = G_MAXINT; + picture->age = 256*256*256*64; picture->opaque = buf; GST_LOG_OBJECT (ffmpegdec, "returned buffer %p", buf); -- 2.7.4