diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-18 21:48:49 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-27 12:55:41 +0100 |
commit | a5ee1663270cd15fa4d5f40d384a8d9eab4f7218 (patch) | |
tree | 18b4821e4f298b96c9e6e32bfba6c2181dbd5b8b /libavformat/avformat.h | |
parent | c90b3661fadcec98ab6462ac9f8180aa0cb8ec62 (diff) |
avformat/avformat: Add AVStream parameter to check_bitstream() sig
For most check_bitstream() functions this just avoids having
to dereference s->streams[pkt->stream_index] themselves; but for
meta-muxers it will allow to forward the packet to stream with
a different stream_index (belonging to a different AVFormatContext)
without using a spare packet.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 0343825aa0..75699f3a32 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -322,6 +322,7 @@ #include "libavformat/version.h" struct AVFormatContext; +struct AVStream; struct AVDeviceInfoList; struct AVDeviceCapabilitiesQuery; @@ -623,9 +624,13 @@ typedef struct AVOutputFormat { /** * Set up any necessary bitstream filtering and extract any extra data needed * for the global header. + * + * @note pkt might have been directly forwarded by a meta-muxer; therefore + * pkt->stream_index as well as the pkt's timebase might be invalid. * Return 0 if more packets from this stream must be checked; 1 if not. */ - int (*check_bitstream)(struct AVFormatContext *, const AVPacket *pkt); + int (*check_bitstream)(struct AVFormatContext *s, struct AVStream *st, + const AVPacket *pkt); } AVOutputFormat; /** * @} |