Commit 63bb1e3a authored by Seungha Yang's avatar Seungha Yang 🐑

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'
parent 75f26bc9
Pipeline #25011 failed with stages
in 20 minutes and 47 seconds
......@@ -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);
"Calculating framerate, timescale %u gave fps_n %d fps_d %d",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment