diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-24 14:58:07 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-17 04:58:34 +0200 |
commit | fed02825081bd6441f865c9cfcf50e384b2392f5 (patch) | |
tree | b42f4b433b1652e4ad65bc0b5066fe3e80d5662f /libavformat/svs.c | |
parent | dfbf41775cb58a9218a8b39b0dc6fd8de3f1ab35 (diff) | |
download | ffmpeg-fed02825081bd6441f865c9cfcf50e384b2392f5.tar.gz |
avformat: Avoid allocation for AVFormatInternal
Do this by allocating AVFormatContext together with the data that is
currently in AVFormatInternal; or rather: Put AVFormatContext at the
beginning of a new structure called FFFormatContext (which encompasses
more than just the internal fields and is a proper context in its own
right, hence the name) and remove AVFormatInternal altogether.
The biggest simplifications occured in avformat_alloc_context(), where
one can now simply call avformat_free_context() in case of errors.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/svs.c')
-rw-r--r-- | libavformat/svs.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libavformat/svs.c b/libavformat/svs.c index da63c8e370..e5300203f5 100644 --- a/libavformat/svs.c +++ b/libavformat/svs.c @@ -51,7 +51,6 @@ static int svs_read_header(AVFormatContext *s) pitch = avio_rl32(s->pb); avio_skip(s->pb, 12); - s->internal->data_offset = avio_tell(s->pb); st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_ADPCM_PSX; st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO; |