mpeg2dec: Fix latency calculation

The latency calculation was missing a scaling by GST_SECOND,
so it would always report a tiny latency. Fix that.

Spotted by Guillaume Desmottes.
This commit is contained in:
Jan Schmidt 2017-03-01 23:00:55 +11:00
parent 66659f07f5
commit 09f412dc3c

View file

@ -807,7 +807,7 @@ handle_sequence (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
/* Mpeg2dec has 2 frame latency to produce a picture and 1 frame latency in /* Mpeg2dec has 2 frame latency to produce a picture and 1 frame latency in
* it's parser */ * it's parser */
latency = gst_util_uint64_scale (3, vinfo->fps_d, vinfo->fps_n); latency = gst_util_uint64_scale (3 * GST_SECOND, vinfo->fps_d, vinfo->fps_n);
gst_video_decoder_set_latency (GST_VIDEO_DECODER (mpeg2dec), latency, gst_video_decoder_set_latency (GST_VIDEO_DECODER (mpeg2dec), latency,
latency); latency);