ext/ffmpeg/gstffmpegdec.c: Disable direct rendering for h264 since it does not always...
authorWim Taymans <wim.taymans@gmail.com>
Tue, 22 Jan 2008 17:16:12 +0000 (17:16 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 22 Jan 2008 17:16:12 +0000 (17:16 +0000)
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
ext/ffmpeg/gstffmpegdec.c

index 757b76b..7eb1aac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-01-22  Wim Taymans  <wim.taymans@collabora.co.uk>
 
+       * 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  <wim.taymans@collabora.co.uk>
+
        * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_set_property),
        (gst_ffmpegdec_get_property):
        Implement get/set for the new property too.
index 89e367b..af24446 100644 (file)
@@ -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);