diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-24 19:41:16 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-17 13:22:25 +0200 |
commit | 40bdd8cc05d9c98a18cf2b1c2a00c8a5a7b38113 (patch) | |
tree | 0fc408f78b9b6934ac351cd4499c07737f8f6a62 /libavformat/segment.c | |
parent | 9f05b3ba604a30eeb6f5ff877b8b5b5c93a268d7 (diff) | |
download | ffmpeg-40bdd8cc05d9c98a18cf2b1c2a00c8a5a7b38113.tar.gz |
avformat: Avoid allocation for AVStreamInternal
Do this by allocating AVStream together with the data that is
currently in AVStreamInternal; or rather: Put AVStream at the
beginning of a new structure called FFStream (which encompasses
more than just the internal fields and is a proper context in its own
right, hence the name) and remove AVStreamInternal altogether.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r-- | libavformat/segment.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c index 7c171b6fa4..2b024fd373 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -991,10 +991,10 @@ static int seg_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) if (oc->oformat->check_bitstream) { int ret = oc->oformat->check_bitstream(oc, pkt); if (ret == 1) { - AVStream *st = s->streams[pkt->stream_index]; - AVStream *ost = oc->streams[pkt->stream_index]; - st->internal->bsfc = ost->internal->bsfc; - ost->internal->bsfc = NULL; + FFStream *const sti = ffstream( s->streams[pkt->stream_index]); + FFStream *const osti = ffstream(oc->streams[pkt->stream_index]); + sti->bsfc = osti->bsfc; + osti->bsfc = NULL; } return ret; } |