summaryrefslogtreecommitdiff
path: root/libavcodec/cbs_sei.c
Commit message (Collapse)AuthorAge
* avcodec/cbs_sei: Fix leak of AVBufferRef on errorAndreas Rheinhardt2021-03-12
| | | | | | | | | | | | | | | An AVBufferRef (and the corresponding AVBuffer and the underlying actual buffer) would leak in ff_cbs_sei_add_message() on error in case an error happened after its creation and before it has been attached to more permanent storage. Fix this by only creating the AVBufferRef immediately before attaching it to its intended target position. (Given that no SEI message currently created is refcounted, the above can't happen at the moment. But Coverity already nevertheless noticed: This commit fixes Coverity issue #1473521.) Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs_sei: Don't use -1th element of arrayAndreas Rheinhardt2021-03-12
| | | | | | | | (This affected only suffix SEI messages; yet no such SEI messages are currently inserted.) Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* cbs_h2645: Merge SEI message handling in common between codecsMark Thompson2021-01-21