summaryrefslogtreecommitdiff
path: root/libavformat/swfdec.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/swfdec.c
parent9f05b3ba604a30eeb6f5ff877b8b5b5c93a268d7 (diff)
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/swfdec.c')
-rw-r--r--libavformat/swfdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 8eda80b4f6..e549e4f50b 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -204,7 +204,7 @@ static AVStream *create_new_audio_stream(AVFormatContext *s, int id, int info)
}
ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codecpar->codec_id = ff_codec_get_id(swf_audio_codec_tags, info>>4 & 15);
- ast->internal->need_parsing = AVSTREAM_PARSE_FULL;
+ ffstream(ast)->need_parsing = AVSTREAM_PARSE_FULL;
sample_rate_code = info>>2 & 3;
sample_size_code = info>>1 & 1;
if (!sample_size_code && ast->codecpar->codec_id == AV_CODEC_ID_PCM_S16LE)
@@ -293,7 +293,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(ENOMEM);
ast->duration = avio_rl32(pb); // number of samples
if (((v>>4) & 15) == 2) { // MP3 sound data record
- ast->internal->skip_samples = avio_rl16(pb);
+ ffstream(ast)->skip_samples = avio_rl16(pb);
len -= 2;
}
len -= 7;