msdkdec: Fix latency calculation

Use async_depth for latency calcuation instead of
the length of Tasks array which could be NULL since we
don't do the msdk decoder init in set_format().
This commit is contained in:
Sreerenj Balachandran 2018-07-03 18:38:04 -08:00
parent 84c33be0c0
commit dd981d4953

View file

@ -560,7 +560,7 @@ gst_msdkdec_set_latency (GstMsdkDec * thiz)
gint min_delayed_frames;
GstClockTime latency;
min_delayed_frames = thiz->tasks->len;
min_delayed_frames = thiz->async_depth;
if (info->fps_n) {
latency = gst_util_uint64_scale_ceil (GST_SECOND * info->fps_d,