aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-11-17 12:42:01 +0100
committerAnton Khirnov <anton@khirnov.net>2022-11-28 10:28:14 +0100
commitb1143330c8db6e738312245414656a001cd007a4 (patch)
treeb1a7e0e957f39ff6adeb0db5d67e48af32f32fce /fftools/ffmpeg.h
parent630fbdcc526c919986ff8ccc6712653ff1ef637b (diff)
downloadffmpeg-b1143330c8db6e738312245414656a001cd007a4.tar.gz
fftools/ffmpeg: move force-keyframe-related vars to a separate struct
There are 8 of them and they are typically used together. Allows to pass just this struct to forced_kf_apply(), which makes it clear that the rest of the OutputStream is not accessed there.
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r--fftools/ffmpeg.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 4b76b1d0d7..db1f00b259 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -487,6 +487,21 @@ typedef enum {
MUXER_FINISHED = 2,
} OSTFinished ;
+typedef struct KeyframeForceCtx {
+ char *forced_keyframes;
+
+ int64_t ref_pts;
+
+ int64_t *pts;
+ int nb_pts;
+ int index;
+
+ AVExpr *pexpr;
+ double expr_const_values[FKF_NB];
+
+ int dropped_keyframe;
+} KeyframeForceCtx;
+
typedef struct OutputStream {
int file_index; /* file index */
int index; /* stream index in the output file */
@@ -543,15 +558,7 @@ typedef struct OutputStream {
AVRational frame_aspect_ratio;
- /* forced key frames */
- int64_t forced_kf_ref_pts;
- int64_t *forced_kf_pts;
- int forced_kf_count;
- int forced_kf_index;
- char *forced_keyframes;
- AVExpr *forced_keyframes_pexpr;
- double forced_keyframes_expr_const_values[FKF_NB];
- int dropped_keyframe;
+ KeyframeForceCtx kf;
/* audio only */
#if FFMPEG_OPT_MAP_CHANNEL