summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2011-04-14 16:21:15 -0700
committerDavid Schleef <ds@schleef.org>2011-04-24 19:40:08 -0700
commitaa02a4074fed7ead5f17e9e21ac4f430df6f78a9 (patch)
tree423e36213c51e8dddac8964b4f78e2f3cd045f9c /gst-libs
parent412b37ff1b653de2c24bd41b376da0b6627b5369 (diff)
downloadgstreamer-plugins-bad-aa02a4074fed7ead5f17e9e21ac4f430df6f78a9.tar.gz
basevideo: Check if caps are set directly
Fixes #647854.
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/video/gstbasevideodecoder.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gst-libs/gst/video/gstbasevideodecoder.c b/gst-libs/gst/video/gstbasevideodecoder.c
index 4eb0ed5af..cf3910f75 100644
--- a/gst-libs/gst/video/gstbasevideodecoder.c
+++ b/gst-libs/gst/video/gstbasevideodecoder.c
@@ -745,8 +745,6 @@ gst_base_video_decoder_reset (GstBaseVideoDecoder * base_video_decoder)
base_video_decoder->current_frame = NULL;
}
- base_video_decoder->have_src_caps = FALSE;
-
GST_OBJECT_LOCK (base_video_decoder);
GST_BASE_VIDEO_CODEC (base_video_decoder)->earliest_time =
GST_CLOCK_TIME_NONE;
@@ -1442,7 +1440,7 @@ gst_base_video_decoder_set_src_caps (GstBaseVideoDecoder * base_video_decoder)
GstCaps *caps;
GstVideoState *state = &GST_BASE_VIDEO_CODEC (base_video_decoder)->state;
- if (base_video_decoder->have_src_caps)
+ if (GST_PAD_CAPS (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_decoder)) != NULL)
return;
caps = gst_video_format_new_caps (state->format,
@@ -1455,8 +1453,6 @@ gst_base_video_decoder_set_src_caps (GstBaseVideoDecoder * base_video_decoder)
gst_pad_set_caps (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_decoder), caps);
- base_video_decoder->have_src_caps = TRUE;
-
gst_caps_unref (caps);
}
@@ -1469,8 +1465,12 @@ gst_base_video_decoder_alloc_src_buffer (GstBaseVideoDecoder *
int num_bytes;
GstVideoState *state = &GST_BASE_VIDEO_CODEC (base_video_decoder)->state;
+ gst_base_video_decoder_set_src_caps (base_video_decoder);
+
num_bytes = gst_video_format_get_size (state->format, state->width,
state->height);
+ GST_DEBUG ("alloc src buffer caps=%" GST_PTR_FORMAT,
+ GST_PAD_CAPS (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_decoder)));
flow_ret =
gst_pad_alloc_buffer_and_set_caps (GST_BASE_VIDEO_CODEC_SRC_PAD
(base_video_decoder), GST_BUFFER_OFFSET_NONE, num_bytes,