diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-23 13:37:04 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-28 15:25:18 +0200 |
commit | c1f48582428f7d5e7d93d2f0af6d4612559f74ca (patch) | |
tree | 4855edef6fd8239024576c94b48b2fdf90d500fc /libavformat/flac_picture.h | |
parent | b10a8a30dbf605fb0761c9ee64cfbe8cb87ba710 (diff) | |
download | ffmpeg-c1f48582428f7d5e7d93d2f0af6d4612559f74ca.tar.gz |
avformat/flac_picture: Try to reuse buffer for attached picture
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/flac_picture.h')
-rw-r--r-- | libavformat/flac_picture.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libavformat/flac_picture.h b/libavformat/flac_picture.h index 61fd0c8806..db074e531d 100644 --- a/libavformat/flac_picture.h +++ b/libavformat/flac_picture.h @@ -26,6 +26,18 @@ #define RETURN_ERROR(code) do { ret = (code); goto fail; } while (0) -int ff_flac_parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size, int truncate_workaround); +/** + * Parse a FLAC METADATA_BLOCK_PICTURE + * + * @param s AVFormatContext for logging and the attached picture stream. + * @param buf `*buf` points to the actual data which must be padded by + * AV_INPUT_BUFFER_PADDING_SIZE bytes not counted in buf_size. + * This function may take ownership of `*buf` and reset it. + * @param buf_size size of `*buf` (excluding padding) + * @param truncate_workaround If set, additional data may be read from s->pb if + * truncation has been detected. + */ +int ff_flac_parse_picture(AVFormatContext *s, uint8_t **buf, int buf_size, + int truncate_workaround); #endif /* AVFORMAT_FLAC_PICTURE_H */ |