avviddec: improve latency calculation
authorMathieu Duponchelle <mathieu@centricular.com>
Wed, 17 Jul 2019 22:20:16 +0000 (00:20 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Wed, 17 Jul 2019 22:26:50 +0000 (00:26 +0200)
commit1e8e040fbc7cfff63f29c5c872685bbb5578d965
tree5b33290acbabc7829162152ad4de3508bb733262
parente8f21b510a7cad1215bc698d519bd30e9c9e340c
avviddec: improve latency calculation

When thread_type is set to FF_THREAD_FRAME, per the documentation
a latency of one frame per thread is introduced:

<https://ffmpeg.org/ffmpeg-codecs.html>, search for thread_type.

Additionally, we need in that case to calculate the automatic
number of threads ourselves, so as to accurately calculate the
latency.
ext/libav/gstavviddec.c