Re: [FFmpeg-devel] [PATCH] avformat/concat: finalize the AVBprint buffer immediately

2021-07-27 Thread Marton Balint
On Mon, 26 Jul 2021, James Almer wrote: On 7/26/2021 6:49 PM, Marton Balint wrote: On Mon, 26 Jul 2021, James Almer wrote: Don't attempt to read its contents in place. Fixes invalid reads when run under Valgrind. As far as I remember AVBPrint buffer CAN be read in place by design,

Re: [FFmpeg-devel] [PATCH] avformat/concat: finalize the AVBprint buffer immediately

2021-07-26 Thread James Almer
On 7/26/2021 6:49 PM, Marton Balint wrote: On Mon, 26 Jul 2021, James Almer wrote: Don't attempt to read its contents in place. Fixes invalid reads when run under Valgrind. As far as I remember AVBPrint buffer CAN be read in place by design, zero terminator is always guaranteed, not only

Re: [FFmpeg-devel] [PATCH] avformat/concat: finalize the AVBprint buffer immediately

2021-07-26 Thread Nicolas George
Marton Balint (12021-07-26): > As far as I remember AVBPrint buffer CAN be read in place by design, zero > terminator is always guaranteed, not only after finalizing. So this should > not be needed. What is causing the invalid reads exactly? I confirm your memory. The documentation states: *

Re: [FFmpeg-devel] [PATCH] avformat/concat: finalize the AVBprint buffer immediately

2021-07-26 Thread Marton Balint
On Mon, 26 Jul 2021, James Almer wrote: Don't attempt to read its contents in place. Fixes invalid reads when run under Valgrind. As far as I remember AVBPrint buffer CAN be read in place by design, zero terminator is always guaranteed, not only after finalizing. So this should not be

[FFmpeg-devel] [PATCH] avformat/concat: finalize the AVBprint buffer immediately

2021-07-26 Thread James Almer
Don't attempt to read its contents in place. Fixes invalid reads when run under Valgrind. Signed-off-by: James Almer --- libavformat/concat.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavformat/concat.c b/libavformat/concat.c index aec1f52d8e..64ac03e1d8