summaryrefslogtreecommitdiff
path: root/libavformat/cinedec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-24 19:41:16 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-17 13:22:25 +0200
commit40bdd8cc05d9c98a18cf2b1c2a00c8a5a7b38113 (patch)
tree0fc408f78b9b6934ac351cd4499c07737f8f6a62 /libavformat/cinedec.c
parent9f05b3ba604a30eeb6f5ff877b8b5b5c93a268d7 (diff)
downloadffmpeg-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/cinedec.c')
-rw-r--r--libavformat/cinedec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c
index f1fae6e5db..c83a4c1471 100644
--- a/libavformat/cinedec.c
+++ b/libavformat/cinedec.c
@@ -285,13 +285,14 @@ static int cine_read_packet(AVFormatContext *avctx, AVPacket *pkt)
{
CineDemuxContext *cine = avctx->priv_data;
AVStream *st = avctx->streams[0];
+ FFStream *const sti = ffstream(st);
AVIOContext *pb = avctx->pb;
int n, size, ret;
- if (cine->pts >= st->internal->nb_index_entries)
+ if (cine->pts >= sti->nb_index_entries)
return AVERROR_EOF;
- avio_seek(pb, st->internal->index_entries[cine->pts].pos, SEEK_SET);
+ avio_seek(pb, sti->index_entries[cine->pts].pos, SEEK_SET);
n = avio_rl32(pb);
if (n < 8)
return AVERROR_INVALIDDATA;