mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-20 06:59:58 -05:00
gst: fix JPEG format
Since commit f400ff2050 ("gst: Check for video/ caps before parsing
for info") JPEG support in the GStreamer elements is broken as JPEG is
not recognized as a video format anymore.
gst_video_info_from_caps is able to handle "video/" and "image/"
formats. Therefore, the check needs to allow "image/" too.
While at it, cleanup the formatting to make the check more readable.
This commit is contained in:
parent
3b68b5088b
commit
a9bf5fa24a
2 changed files with 9 additions and 8 deletions
|
|
@ -204,6 +204,7 @@ set_config (GstBufferPool * pool, GstStructure * config)
|
|||
{
|
||||
GstPipeWirePool *p = GST_PIPEWIRE_POOL (pool);
|
||||
GstCaps *caps;
|
||||
GstStructure *structure;
|
||||
guint size, min_buffers, max_buffers;
|
||||
gboolean has_video;
|
||||
|
||||
|
|
@ -217,9 +218,9 @@ set_config (GstBufferPool * pool, GstStructure * config)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (g_str_has_prefix (gst_structure_get_name (
|
||||
gst_caps_get_structure (caps, 0)),
|
||||
"video/")) {
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
if (g_str_has_prefix (gst_structure_get_name (structure), "video/") ||
|
||||
g_str_has_prefix (gst_structure_get_name (structure), "image/")) {
|
||||
has_video = TRUE;
|
||||
gst_video_info_from_caps (&p->video_info, caps);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue