Commit 707b532c authored by Edward Hervey's avatar Edward Hervey

avvidec: Don't set bogus latency

We might have cases where the framerate is not known (0/1).
parent b0380bb4
......@@ -1095,11 +1095,13 @@ gst_ffmpegviddec_negotiate (GstFFMpegVidDec * ffmpegdec,
goto negotiate_failed;
/* The decoder is configured, we now know the true latency */
latency =
gst_util_uint64_scale_ceil (ffmpegdec->context->has_b_frames * GST_SECOND,
fps_d, fps_n);
gst_video_decoder_set_latency (GST_VIDEO_DECODER (ffmpegdec), latency,
latency);
if (fps_n) {
latency =
gst_util_uint64_scale_ceil (ffmpegdec->context->has_b_frames *
GST_SECOND, fps_d, fps_n);
gst_video_decoder_set_latency (GST_VIDEO_DECODER (ffmpegdec), latency,
latency);
}
return TRUE;
......
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