summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2017-03-01 23:00:55 +1100
committerJan Schmidt <jan@centricular.com>2017-03-01 23:04:00 +1100
commit09f412dc3c7e7fc2b531ddee142160ace921297e (patch)
treeb719a265459852bb4a3a67e7feaffa149e9ce282
parent66659f07f59ca9fcfdef7ae0531ffa681ee5b079 (diff)
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.
-rw-r--r--ext/mpeg2dec/gstmpeg2dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c
index 137c7eae..48f294e3 100644
--- a/ext/mpeg2dec/gstmpeg2dec.c
+++ b/ext/mpeg2dec/gstmpeg2dec.c
@@ -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
* 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,
latency);