From: Seungha Yang Date: Tue, 19 Mar 2019 03:31:35 +0000 (+0900) Subject: qtdemux: Don't pass zero to denominator for framerate X-Git-Tag: 1.16.2~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63bb1e3a4d24cf01cfcf235e25b8bf737c834f7a;p=platform%2Fupstream%2Fgst-plugins-good.git qtdemux: Don't pass zero to denominator for framerate Need to respect return of gst_video_guess_framerate() to ensure non-zero denominator. This patch is to fix below error with an abnormal (but has valid frame) file. (gst-play-1.0:17940): GStreamer-CRITICAL **: passed '0' as denominator for `GstFraction' --- diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 502085b..cf15fad 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -8522,8 +8522,9 @@ gst_qtdemux_guess_framerate (GstQTDemux * qtdemux, QtDemuxStream * stream) GST_TIME_FORMAT, duration, first_duration, n_samples - 1, GST_TIME_ARGS (avg_duration)); - gst_video_guess_framerate (avg_duration, &CUR_STREAM (stream)->fps_n, - &CUR_STREAM (stream)->fps_d); + fps_available = + gst_video_guess_framerate (avg_duration, + &CUR_STREAM (stream)->fps_n, &CUR_STREAM (stream)->fps_d); GST_DEBUG_OBJECT (qtdemux, "Calculating framerate, timescale %u gave fps_n %d fps_d %d",