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'
This commit is contained in:
parent
75f26bc954
commit
63bb1e3a4d
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user