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/rawenc.c | |
parent | c90b3661fadcec98ab6462ac9f8180aa0cb8ec62 (diff) | |
download | ffmpeg-a5ee1663270cd15fa4d5f40d384a8d9eab4f7218.tar.gz |
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/rawenc.c')
-rw-r--r-- | libavformat/rawenc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c index 15e7051873..4bbae7717b 100644 --- a/libavformat/rawenc.c +++ b/libavformat/rawenc.c @@ -341,9 +341,9 @@ const AVOutputFormat ff_h263_muxer = { #endif #if CONFIG_H264_MUXER -static int h264_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int h264_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { - AVStream *st = s->streams[0]; if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 && AV_RB24(pkt->data) != 0x000001) return ff_stream_add_bitstream_filter(st, "h264_mp4toannexb", NULL); @@ -364,9 +364,9 @@ const AVOutputFormat ff_h264_muxer = { #endif #if CONFIG_HEVC_MUXER -static int hevc_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int hevc_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { - AVStream *st = s->streams[0]; if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 && AV_RB24(pkt->data) != 0x000001) return ff_stream_add_bitstream_filter(st, "hevc_mp4toannexb", NULL); @@ -468,9 +468,9 @@ const AVOutputFormat ff_mpeg2video_muxer = { #endif #if CONFIG_OBU_MUXER -static int obu_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int obu_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { - AVStream *st = s->streams[0]; return ff_stream_add_bitstream_filter(st, "av1_metadata", "td=insert"); } |