mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
ivfparse: Don't set zero resolution on caps
It could be zero if the information is not available at ivfparse side, or not implemented. In that case, simply don't set width/height on caps, otherwise downstream would be confused Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1649>
This commit is contained in:
parent
2c93afd8bb
commit
66b176322c
1 changed files with 5 additions and 2 deletions
|
@ -225,8 +225,11 @@ gst_ivf_parse_update_src_caps (GstIvfParse * ivf)
|
|||
media_type = fourcc_to_media_type (ivf->fourcc);
|
||||
|
||||
/* Create src pad caps */
|
||||
caps = gst_caps_new_simple (media_type, "width", G_TYPE_INT, ivf->width,
|
||||
"height", G_TYPE_INT, ivf->height, NULL);
|
||||
caps = gst_caps_new_empty_simple (media_type);
|
||||
if (ivf->width > 0 && ivf->height > 0) {
|
||||
gst_caps_set_simple (caps, "width", G_TYPE_INT, ivf->width,
|
||||
"height", G_TYPE_INT, ivf->height, NULL);
|
||||
}
|
||||
|
||||
if (ivf->fps_n > 0 && ivf->fps_d > 0) {
|
||||
gst_base_parse_set_frame_rate (GST_BASE_PARSE_CAST (ivf),
|
||||
|
|
Loading…
Reference in a new issue