summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_mux.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-10-13 13:14:34 +0200
committerAnton Khirnov <anton@khirnov.net>2022-10-18 13:57:43 +0200
commit65d106933a5eea6cd0cb65446266a47cc83215d2 (patch)
treebaf6f0165ca8c7a739bf514fa595c5966585ce26 /fftools/ffmpeg_mux.h
parent24098c6c8d124cd471ec0badb596e42ba6711b82 (diff)
downloadffmpeg-65d106933a5eea6cd0cb65446266a47cc83215d2.tar.gz
fftools/ffmpeg_mux: embed OutputFile in a Muxer
This is now possible since the code allocating OutputFile can see sizeof(Muxer). Avoids the overhead and extra complexity of allocating two objects instead of one. Similar to what is done e.g. for AVStream/FFStream in lavf.
Diffstat (limited to 'fftools/ffmpeg_mux.h')
-rw-r--r--fftools/ffmpeg_mux.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fftools/ffmpeg_mux.h b/fftools/ffmpeg_mux.h
index 920e4ff7ab..90ff979ec1 100644
--- a/fftools/ffmpeg_mux.h
+++ b/fftools/ffmpeg_mux.h
@@ -49,7 +49,9 @@ typedef struct MuxStream {
int64_t last_mux_dts;
} MuxStream;
-struct Muxer {
+typedef struct Muxer {
+ OutputFile of;
+
AVFormatContext *fc;
pthread_t thread;
@@ -67,6 +69,6 @@ struct Muxer {
int header_written;
AVPacket *sq_pkt;
-};
+} Muxer;
#endif /* FFTOOLS_FFMPEG_MUX_H */