summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst-libs/gst/video/gstbasevideodecoder.c6
-rw-r--r--gst-libs/gst/video/gstbasevideodecoder.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/gst-libs/gst/video/gstbasevideodecoder.c b/gst-libs/gst/video/gstbasevideodecoder.c
index 2eede920d..f926def98 100644
--- a/gst-libs/gst/video/gstbasevideodecoder.c
+++ b/gst-libs/gst/video/gstbasevideodecoder.c
@@ -175,6 +175,7 @@ gst_base_video_decoder_sink_setcaps (GstPad * pad, GstCaps * caps)
GstBaseVideoDecoderClass *base_video_decoder_class;
GstStructure *structure;
const GValue *codec_data;
+ gboolean res = TRUE;
base_video_decoder = GST_BASE_VIDEO_DECODER (gst_pad_get_parent (pad));
base_video_decoder_class =
@@ -194,9 +195,12 @@ gst_base_video_decoder_sink_setcaps (GstPad * pad, GstCaps * caps)
base_video_decoder->codec_data = gst_value_get_buffer (codec_data);
}
+ if (base_video_decoder_class->set_sink_caps)
+ res = base_video_decoder_class->set_sink_caps (base_video_decoder, caps);
+
g_object_unref (base_video_decoder);
- return TRUE;
+ return res;
}
static void
diff --git a/gst-libs/gst/video/gstbasevideodecoder.h b/gst-libs/gst/video/gstbasevideodecoder.h
index 1daf728ca..b6052f094 100644
--- a/gst-libs/gst/video/gstbasevideodecoder.h
+++ b/gst-libs/gst/video/gstbasevideodecoder.h
@@ -118,9 +118,7 @@ struct _GstBaseVideoDecoderClass
{
GstBaseVideoCodecClass base_video_codec_class;
- gboolean (*set_format) (GstBaseVideoDecoder *coder, GstVideoFormat,
- int width, int height, int fps_n, int fps_d,
- int par_n, int par_d);
+ gboolean (*set_sink_caps) (GstBaseVideoDecoder *coder, GstCaps *caps);
gboolean (*start) (GstBaseVideoDecoder *coder);
gboolean (*stop) (GstBaseVideoDecoder *coder);
gboolean (*reset) (GstBaseVideoDecoder *coder);
@@ -131,7 +129,6 @@ struct _GstBaseVideoDecoderClass
GstFlowReturn (*handle_frame) (GstBaseVideoDecoder *coder, GstVideoFrame *frame);
GstFlowReturn (*shape_output) (GstBaseVideoDecoder *coder, GstVideoFrame *frame);
GstCaps *(*get_caps) (GstBaseVideoDecoder *coder);
-
};
GType gst_base_video_decoder_get_type (void);