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/mpegtsenc.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/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index e3fba54939..79ec1a7e5f 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -2208,10 +2208,10 @@ static void mpegts_deinit(AVFormatContext *s) av_freep(&ts->services); } -static int mpegts_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +static int mpegts_check_bitstream(AVFormatContext *s, AVStream *st, + const AVPacket *pkt) { int ret = 1; - AVStream *st = s->streams[pkt->stream_index]; if (st->codecpar->codec_id == AV_CODEC_ID_H264) { if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 && |