summaryrefslogtreecommitdiff
path: root/gst-libs/gst/pbutils/descriptions.c
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2013-07-01 10:39:02 +0100
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2013-07-01 10:51:40 +0100
commit065f1603b0f1d2adc8477bf1f3ebe2b154885d89 (patch)
treef1b3c9efadb6348c03db25bfc697887d45055003 /gst-libs/gst/pbutils/descriptions.c
parenta00f4f239abcf6b21c40289d0a4f0967be0c2237 (diff)
pbutils: allow describing unfixed caps if they share the same media type
Caps description and missing plugin code does not really need caps to be fixed, and indeed they may not be if giving encodebin unfixed caps that correspond to an unknown encoder or muxer. So we relax the check, and allow unfixed caps if all the structures refer to the same media type.
Diffstat (limited to 'gst-libs/gst/pbutils/descriptions.c')
-rw-r--r--gst-libs/gst/pbutils/descriptions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst-libs/gst/pbutils/descriptions.c b/gst-libs/gst/pbutils/descriptions.c
index ac27e7dfc..9591f5906 100644
--- a/gst-libs/gst/pbutils/descriptions.c
+++ b/gst-libs/gst/pbutils/descriptions.c
@@ -839,7 +839,7 @@ gst_pb_utils_get_decoder_description (const GstCaps * caps)
tmp = copy_and_clean_caps (caps);
- g_return_val_if_fail (gst_caps_is_fixed (tmp), NULL);
+ g_return_val_if_fail (has_single_media_type (tmp), NULL);
/* special-case RTP caps */
if (caps_are_rtp_caps (tmp, "video", &str)) {
@@ -890,7 +890,7 @@ gst_pb_utils_get_encoder_description (const GstCaps * caps)
g_return_val_if_fail (caps != NULL, NULL);
g_return_val_if_fail (GST_IS_CAPS (caps), NULL);
tmp = copy_and_clean_caps (caps);
- g_return_val_if_fail (gst_caps_is_fixed (tmp), NULL);
+ g_return_val_if_fail (has_single_media_type (tmp), NULL);
/* special-case RTP caps */
if (caps_are_rtp_caps (tmp, "video", &str)) {
@@ -1021,7 +1021,7 @@ gst_pb_utils_get_codec_description (const GstCaps * caps)
g_return_val_if_fail (caps != NULL, NULL);
g_return_val_if_fail (GST_IS_CAPS (caps), NULL);
tmp = copy_and_clean_caps (caps);
- g_return_val_if_fail (gst_caps_is_fixed (tmp), NULL);
+ g_return_val_if_fail (has_single_media_type (tmp), NULL);
info = find_format_info (tmp);