lavc/qsvdec: fix pts
authorHaihao Xiang <haihao.xiang@intel.com>
Fri, 11 Jun 2021 02:19:45 +0000 (10:19 +0800)
committerZhong Li <zhongli_dev@126.com>
Sun, 20 Jun 2021 15:04:35 +0000 (23:04 +0800)
commit971b4ac733630e8d913e17151ce8e01d3c75d1a1
tree17fffb7c03b7e555a7c8d3b45c6caa3e729f5eb9
parent2cf95f2dd96264586b703e7ea32e41df61497b60
lavc/qsvdec: fix pts

The time base used for compressed bitstream and video frame in the SDK
is { 1, 90000 }. [1][2]

This can avoid the error message below from the muxer.

$> ffmpeg -hwaccel qsv -c:v hevc_qsv -i input.h265 -f null -
...
[null @ 0x561c24f6f2f0] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 2 >= 2

[1]https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxbitstream
[2]https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxframedata

Signed-off-by: Zhong Li <zhongli_dev@126.com>
libavcodec/qsvdec.c