[vlc-devel] [PATCH 2/3] demux: avformat: fix negative PTS/DTS
quinkblack at foxmail.com
Thu Aug 31 12:24:03 CEST 2017
On 2017年08月31日 17:58, Francois Cartegnie wrote:
> Le 31/08/2017 à 08:48, Zhao Zhili a écrit :
>> modules/demux/avformat/demux.c | 41
>> 1 file changed, 29 insertions(+), 12 deletions(-)
> If the timestamps are negative from the start, I don't see
> why the issue should be on the API user side.
> But, this seems the same as last February discussion around
> "mux/avformat: normalize pts and dts in AVPacket"
> which had regressions.
I'm trying to fix a case like this:
original_start_time = 1000 * 1000 us;
original_pts = 1000 * 1000 us;
original_dts = 960 * 1000 us;
new_pts = original_pts - original_start_time + VLC_TS_0 = 1 us;
new_dts = original_dts - original_start_time + VLC_TS_0 = -39999 us;
So it's the difference between PTS and DTS lead to the issue.
More information about the vlc-devel