mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
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
This commit is contained in:
parent
267f4c2bad
commit
0c0f803488
1 changed files with 8 additions and 0 deletions
|
@ -950,6 +950,14 @@ _get_encoder (GstEncodeBin * ebin, GstEncodingProfile * sprof)
|
||||||
gst_element_factory_list_filter (ebin->encoders, format,
|
gst_element_factory_list_filter (ebin->encoders, format,
|
||||||
GST_PAD_SRC, FALSE);
|
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)) {
|
if (G_UNLIKELY (encoders == NULL)) {
|
||||||
GST_DEBUG ("Couldn't find any compatible encoders");
|
GST_DEBUG ("Couldn't find any compatible encoders");
|
||||||
goto beach;
|
goto beach;
|
||||||
|
|
Loading…
Reference in a new issue