[FFmpeg-user] timestamps

zhilizhao quinkblack at foxmail.com
Thu Jul 30 11:39:41 EEST 2020



> On Jul 30, 2020, at 2:37 PM, 诸葛亮 <zglvszy at gmail.com> wrote:
> 
> Hello!
>        I am a beginner. When I was reading your source code, I didn't
> quite understand the meaning of is_relative() and RELATIVE_TS_BASE. I would
> like to ask for your help.
>        Thank you very much!

Use git blame:

tree a3eb24614d470ec588bce56268f96c327b0d5c70
parent d07de6d75d36e9e953be7f0cdf82148c31a09b8a
author Michael Niedermayer <michaelni at gmx.at> Wed Mar 7 22:13:39 2012 +0100
committer Michael Niedermayer <michaelni at gmx.at> Fri Mar 9 19:36:12 2012 +0100

lavf: Add system to seperate relative timestamps from absolute ones.

With this we can always know if a timestamp is based on added durations
from an unknown origin or if it is based on a correct timestamp (and possibly
added durations)
This should fix some bugs where this distinction was mixed up.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

Basically, RELATIVE_TS_BASE is the zero point for relative timestamp.
Relative timestamp is in range of (RELATIVE_TS_BASE - 2^48, RELATIVE_TS_BASE + 2^48).

> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list