On Tue, 15 Sep 2020, Andreas Rheinhardt wrote:
Marton Balint:
On Tue, 15 Sep 2020, Paul B Mahol wrote:
This removes big CPU overhead for demuxing chained ogg streams.
Signed-off-by: Paul B Mahol <[email protected]>
---
libavformat/aviobuf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index a77517d712..6d01150f66 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -1005,12 +1005,11 @@ int ffio_ensure_seekback(AVIOContext *s,
int64_t buf_size)
return 0;
av_assert0(!s->write_flag);
- buffer = av_malloc(buf_size);
+ buffer = s->buffer;
+ buffer = av_realloc(buffer, buf_size);
It is not guaranteed that buffer is allocated with av_realloc, so you
cannot realloc it.
This isn't true since 21f70940ae106bfffa07e73057cdb4b5e81a767a any more.
Then av_realloc() docs need updating as well.
Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".