summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg.h
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2022-06-20 20:10:21 +0200
committerMarton Balint <cus@passwd.hu>2022-06-27 20:37:43 +0200
commit20e2aa940cd521bb3b1395e7c7a28cc34059abee (patch)
tree9fc1b65a626dda6a35054df68d72ee60793f92e7 /fftools/ffmpeg.h
parentcbe216d3a62fe22b16a1ba40b9b3f13e5b4ac9a9 (diff)
fftools/ffmpeg: change frame counters to 64 bit
Frame counters can overflow relatively easily (INT_MAX number of frames is slightly more than 1 year for 60 fps content), so make sure we are always using 64 bit values for them. A live stream can easily run for more than a year and the framedup logic breaks on an overflow. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r--fftools/ffmpeg.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 69a368b8d1..99d31c346e 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -458,7 +458,7 @@ typedef struct OutputStream {
int source_index; /* InputStream index */
AVStream *st; /* stream in the output file */
int encoding_needed; /* true if encoding needed for this stream */
- int frame_number;
+ int64_t frame_number;
/* input pts and corresponding output pts
for A/V sync */
struct InputStream *sync_ist; /* input stream to sync against */
@@ -481,8 +481,8 @@ typedef struct OutputStream {
AVFrame *filtered_frame;
AVFrame *last_frame;
AVPacket *pkt;
- int last_dropped;
- int last_nb0_frames[3];
+ int64_t last_dropped;
+ int64_t last_nb0_frames[3];
void *hwaccel_ctx;