]> git.sesse.net Git - ffmpeg/commit
avcodec/decode: Avoid stack packets when decoding subtitles
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 4 Mar 2021 09:53:26 +0000 (10:53 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 9 Mar 2021 13:06:59 +0000 (14:06 +0100)
commite12923f683f468dc4ac7e412578625f2ef14cb7d
tree66ec1713ed4c3f1814caebe48fa97809957942db
parentf0dc8faeb10025ef52cd523b9478c568220377a8
avcodec/decode: Avoid stack packets when decoding subtitles

Use AVCodecInternal.buffer_pkt (previously only used in
avcodec_send_packet) instead of stack packets when decoding subtitles.
Also stop sharing side-data between packets and use the user-supplied
packet directly for decoding when possible (no subtitle decoder ever
modifies the packet it is given).
Reusing AVCodecInternal.buffer_pkt is based upon an idea from James
Almer.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/decode.c