mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-06 01:19:38 +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/1709>
This commit is contained in:
parent
9881bf3c41
commit
23adc61ac7
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