summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-05-15 15:48:35 +0100
committerJan Schmidt <thaytan@noraisin.net>2009-05-20 10:59:47 +0100
commit81e91e54c16841e5f5e501ea98827724b953795f (patch)
tree668daee6841d0fda5b823b6afba7e4446206fe4f
parentff2f62ac8a9f007a75adf27360fe617d0d98f30a (diff)
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.
-rw-r--r--ext/ffmpeg/gstffmpegmux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c
index 55369a8..15cbaf4 100644
--- a/ext/ffmpeg/gstffmpegmux.c
+++ b/ext/ffmpeg/gstffmpegmux.c
@@ -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;
}