summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-08-24 10:27:09 +0200
committerAnton Khirnov <anton@khirnov.net>2023-05-02 10:57:21 +0200
commitc7a852b638b88f129790af31fc47c870c329eaaa (patch)
tree7792085c28b5df4392859d082518dadc9f58ae38 /libavcodec
parent561746591660b456e092324f03d393d6dd9147b1 (diff)
downloadffmpeg-c7a852b638b88f129790af31fc47c870c329eaaa.tar.gz
lavf/dv: do not set video timebase more than once
Current code will call avpriv_set_pts_info() for each video frame, possibly setting a different timebase if the stream framerate changes. This violates API conventions, as the timebase is supposed to stay constant after stream creation. Change the demuxer to set a single timebase that is fine enough to handle all supported DV framerates. The seek tests change slightly because the new timebase is more granular.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/dv.h b/libavcodec/dv.h
index 29f97b6089..b473bdc992 100644
--- a/libavcodec/dv.h
+++ b/libavcodec/dv.h
@@ -60,6 +60,9 @@ enum DVPackType {
*/
#define DV_MAX_FRAME_SIZE 576000
+// LCM of video framerate numerators
+#define DV_TIMESCALE_VIDEO 60000
+
/**
* maximum number of blocks per macroblock in any DV format
*/