diff options
author | Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> | 2015-06-24 23:55:35 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-10-02 17:25:48 +0300 |
commit | 0c0f80348801cea5f190e6b2024f4c0da5381efd (patch) | |
tree | f3cb302fd6774f5e59dc8659d481bd5337e05471 /gst | |
parent | 267f4c2bad072d79ed150f97dfb8a45804cd4c7b (diff) |
encodebin: Fix special case
Allows to run such a command line :
gst-launch-1.0 uridecodebin uri=file:///home/meh/Music/sthg.mp4 ! \
encodebin profile-string="audio/x-wav|1" ! filesink location=sthg.wav
Previously the code failed because wavenc is considered as a muxer.
We still want encodebin to audio/x-wav as an AudioEncodingProfile,
so this simple fix allows that.
Ability to mux raw streams in containers such as matroskamux
is a different issue.
https://bugzilla.gnome.org/show_bug.cgi?id=751470
Diffstat (limited to 'gst')
-rw-r--r-- | gst/encoding/gstencodebin.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index 88952085b..69d37eaa7 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -950,6 +950,14 @@ _get_encoder (GstEncodeBin * ebin, GstEncodingProfile * sprof) gst_element_factory_list_filter (ebin->encoders, format, GST_PAD_SRC, FALSE); + if (G_UNLIKELY (encoders == NULL) && sprof == ebin->profile) { + /* Special case: if the top-level profile is an encoder, + * it could be listed in our muxers (for example wavenc) + */ + encoders = gst_element_factory_list_filter (ebin->muxers, format, + GST_PAD_SRC, FALSE); + } + if (G_UNLIKELY (encoders == NULL)) { GST_DEBUG ("Couldn't find any compatible encoders"); goto beach; |