diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-03-29 08:50:18 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-01 18:23:13 +0200 |
commit | 7aee4762d336a10e5ef51a32a449efaa349e9d07 (patch) | |
tree | ab44bb537806bbebf9b900b5774d0fb51fc27bf7 /libavformat/internal.h | |
parent | 39ecb63d0f082ee3b2ac2ac65577170deb245ec4 (diff) |
avformat/utils: Free new streams in ff_add_attached_pic on error
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r-- | libavformat/internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h index b3c5d8a1d5..a6987619f7 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -678,6 +678,9 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt); * @param buf if set, it contains the data and size information to be used * for the attached pic; if unset, data is read from pb. * @param size the size of the data to read if buf is unset. + * + * @return 0 on success, < 0 on error. On error, this function removes + * the stream it has added (if any). */ int ff_add_attached_pic(AVFormatContext *s, AVStream *st, AVIOContext *pb, AVBufferRef **buf, int size); |