mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
ffmpeg: Don't add sink pad template to the muxers when not needed.
If the set of caps for either audio or video is completely empty, skip adding that pad template to the class. Some muxers only support audio-only or video-only and otherwise end up with EMPTY caps in the pad template.
This commit is contained in:
parent
ff2f62ac8a
commit
81e91e54c1
1 changed files with 4 additions and 0 deletions
|
@ -719,6 +719,10 @@ gst_ffmpegmux_get_id_caps (enum CodecID * id_list)
|
|||
if ((t = gst_ffmpeg_codecid_to_caps (id_list[i], NULL, TRUE)))
|
||||
gst_caps_append (caps, t);
|
||||
}
|
||||
if (gst_caps_is_empty (caps)) {
|
||||
gst_caps_unref (caps);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue