aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/cmdutils.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-12-04 13:37:13 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-05 17:22:40 +0100
commitbc3cf2bbd320e1ade2791dca02b9ba947ca436ab (patch)
tree4cfe9db590e7c31f0e3b2a94e9e59fdbe8eca6c2 /fftools/cmdutils.c
parent3f37880c05714ede6590fb32390ed991552d5115 (diff)
downloadffmpeg-bc3cf2bbd320e1ade2791dca02b9ba947ca436ab.tar.gz
avformat/mpeg: Don't copy or leak string in AVBPrint
vobsub_read_header() uses an AVBPrint to write a string and up until now, it collected the string stored in the AVBPrint via av_bprint_finalize(), which might involve an allocation and copy of the string. But this is unnecessary, as the lifetime of the returned string does not exceed the lifetime of the AVBPrint. So use the string in the AVBPrint directly. This also makes it possible to easily fix a memleak: In certain error situations, the string stored in the AVBPrint would not be freed (if it was dynamically allocated). This has been fixed, too. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'fftools/cmdutils.c')
0 files changed, 0 insertions, 0 deletions