lavc/mediacodec: rescale pts before decoding for both hw and sw buffers
authorAman Gupta <aman@tmm1.net>
Mon, 3 Jul 2017 16:21:50 +0000 (09:21 -0700)
committerMatthieu Bouron <matthieu.bouron@gmail.com>
Mon, 3 Jul 2017 21:39:06 +0000 (23:39 +0200)
commitaad79e4323bb03837cc6611b99b72c1cf1a7b6f6
tree85d741e536fca60d345a2a6ce5ad9a02233d1dec
parent6d4a686d45218fd9ac312fd3f3056680ce169d40
lavc/mediacodec: rescale pts before decoding for both hw and sw buffers

Replicates the logic used in the wrap_hw_buffer path to wrap_sw_buffer
as well.

Fixes decoding issues observed on AMLogic devices with
OMX.amlogic.mpeg2.decoder.awesome, where the decoder would spit out a
constant stream of "mPtsRecoveryCount" errors and decoded frames were
returned in the incorrect order.

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
libavcodec/mediacodecdec_common.c