mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
basevideoencoder: Only get caps from the subclass if they were not set yet by the subclass
This commit is contained in:
parent
b2525a3044
commit
e5be8aa8ff
1 changed files with 11 additions and 8 deletions
|
@ -809,6 +809,7 @@ gst_base_video_encoder_finish_frame (GstBaseVideoEncoder * base_video_encoder,
|
|||
* and subsequently set. subclass is adult enough to set_caps itself ...
|
||||
* so simply check/ensure/assert that src pad caps are set by now */
|
||||
if (!base_video_encoder->set_output_caps) {
|
||||
if (!GST_PAD_CAPS (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_encoder))) {
|
||||
GstCaps *caps;
|
||||
|
||||
if (base_video_encoder_class->get_caps) {
|
||||
|
@ -817,8 +818,10 @@ gst_base_video_encoder_finish_frame (GstBaseVideoEncoder * base_video_encoder,
|
|||
caps = gst_caps_new_simple ("video/unknown", NULL);
|
||||
}
|
||||
GST_DEBUG_OBJECT (base_video_encoder, "src caps %" GST_PTR_FORMAT, caps);
|
||||
gst_pad_set_caps (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_encoder), caps);
|
||||
gst_pad_set_caps (GST_BASE_VIDEO_CODEC_SRC_PAD (base_video_encoder),
|
||||
caps);
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
base_video_encoder->set_output_caps = TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue