summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-19 16:02:15 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-20 03:56:57 +0100
commit9faf3f8bb04e537f552332aa316c6659dcd7d251 (patch)
tree6bcc79a58a9c00053580785ff0b91810f769c0e6 /libavformat/utils.c
parentf21b47f38c2fe67fe218a5621aec24be45ca12a2 (diff)
avcodec/parser: Don't return pointer to stack buffer
When flushing, the parser receives a dummy buffer with padding that lives on the stack of av_parser_parse2(). Certain parsers (e.g. Dolby E) only analyze the input, but don't repack it. When flushing, such parsers return a pointer to the stack buffer and a size of 0. And this is also what av_parser_parse2() returns. Fix this by always resetting poutbuf in case poutbuf_size is zero. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/utils.c')
0 files changed, 0 insertions, 0 deletions