diff options
author | Marton Balint <cus@passwd.hu> | 2022-04-10 17:53:30 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2022-04-22 22:54:56 +0200 |
commit | 8dd5bb728038f21d17ec789e21d65fe8f3f364a6 (patch) | |
tree | 9857df6d3888547b75a4d56d1186e0db8470d33b /libavformat/isom.h | |
parent | 58454749a7e6b854d0120a2f58dff40a3ee7bf40 (diff) |
avformat/mov: fix timecode with high frame rate content
60 fps content have "Number of Frames" set to 30 in the tmcd atom, but the
frame duration / timescale reflects the original video frame rate.
Therefore we multiply the frame count with the quotient of the rounded timecode
frame rate and the "Number of Frames" per second to get a frame count in the original
(higher) frame rate.
Note that the frames part in the timecode will be in high frame rate which will
make the timecode different to e.g. MediaInfo which seems to show the 30 fps
timecode even for 120 fps content.
Regression since 428b4aacb1a91a267650de644519882a5f700388.
Fixes ticket #9710.
Fixes ticket #9492.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r-- | libavformat/isom.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h index 5caf42b15d..99408a42d1 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -214,6 +214,7 @@ typedef struct MOVStreamContext { int has_palette; int64_t data_size; uint32_t tmcd_flags; ///< tmcd track flags + uint8_t tmcd_nb_frames; ///< tmcd number of frames per tick / second int64_t track_end; ///< used for dts generation in fragmented movie files int start_pad; ///< amount of samples to skip due to enc-dec delay unsigned int rap_group_count; |