diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-24 15:58:07 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-17 05:58:34 +0300 |
commit | fed02825081bd6441f865c9cfcf50e384b2392f5 (patch) | |
tree | b42f4b433b1652e4ad65bc0b5066fe3e80d5662f /libavformat/webm_chunk.c | |
parent | dfbf41775cb58a9218a8b39b0dc6fd8de3f1ab35 (diff) |
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/webm_chunk.c')
-rw-r--r-- | libavformat/webm_chunk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c index f4d0db83a4..24390e8e74 100644 --- a/libavformat/webm_chunk.c +++ b/libavformat/webm_chunk.c @@ -125,8 +125,8 @@ fail: // This ensures that the timestamps will already be properly shifted // when the packets arrive here, so we don't need to shift again. s->avoid_negative_ts = oc->avoid_negative_ts; - s->internal->avoid_negative_ts_use_pts = - oc->internal->avoid_negative_ts_use_pts; + ffformatcontext(s)->avoid_negative_ts_use_pts = + ffformatcontext(oc)->avoid_negative_ts_use_pts; oc->avoid_negative_ts = 0; return 0; |