From 20d5f92b2813b1ee9e67b80be20f99e0ba8a1444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 26 Jul 2018 15:25:06 -0400 Subject: [PATCH] qtdemux: Only set width/height in caps if they're non-0 If they are not valid, then let a downstream parser complete them. https://bugzilla.gnome.org/show_bug.cgi?id=796878 --- gst/isomp4/qtdemux.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 74d8ca6d1e..bf890dc420 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -8314,9 +8314,10 @@ gst_qtdemux_configure_stream (GstQTDemux * qtdemux, QtDemuxStream * stream) CUR_STREAM (stream)->caps = gst_caps_make_writable (CUR_STREAM (stream)->caps); - gst_caps_set_simple (CUR_STREAM (stream)->caps, - "width", G_TYPE_INT, CUR_STREAM (stream)->width, - "height", G_TYPE_INT, CUR_STREAM (stream)->height, NULL); + if (CUR_STREAM (stream)->width && CUR_STREAM (stream)->height) + gst_caps_set_simple (CUR_STREAM (stream)->caps, + "width", G_TYPE_INT, CUR_STREAM (stream)->width, + "height", G_TYPE_INT, CUR_STREAM (stream)->height, NULL); /* set framerate if calculated framerate is reliable */ if (fps_available) {