mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
assrender: Do not iterate over mimetypes without filename
No point spending time on iterating and comparing strings if we are going to reject the value due to missing filename anyway. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1206>
This commit is contained in:
parent
e6ff71f8e7
commit
18b5806ab9
1 changed files with 4 additions and 4 deletions
|
@ -1572,6 +1572,10 @@ gst_ass_render_handle_tag_sample (GstAssRender * render, GstSample * sample)
|
|||
if (!buf || !structure)
|
||||
return;
|
||||
|
||||
filename = gst_structure_get_string (structure, "filename");
|
||||
if (!filename)
|
||||
return;
|
||||
|
||||
valid_mimetype = FALSE;
|
||||
valid_extension = FALSE;
|
||||
|
||||
|
@ -1585,10 +1589,6 @@ gst_ass_render_handle_tag_sample (GstAssRender * render, GstSample * sample)
|
|||
}
|
||||
}
|
||||
|
||||
filename = gst_structure_get_string (structure, "filename");
|
||||
if (!filename)
|
||||
return;
|
||||
|
||||
if (!valid_mimetype) {
|
||||
guint len = strlen (filename);
|
||||
const gchar *extension = filename + len - 4;
|
||||
|
|
Loading…
Reference in a new issue