From dfeb9b3a8b5a5680ae7d3e813314bb434b2788c4 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 29 Mar 2021 08:31:36 +0200 Subject: avformat/asf: Factor common code out Both functions to read attached pictures coincide since e83f27a21a6d2f602b55e541ef66e365400e9827 (save for some log messages in case av_dict_set failed). Signed-off-by: Andreas Rheinhardt --- libavformat/asf.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libavformat/asf.h') diff --git a/libavformat/asf.h b/libavformat/asf.h index bce820efae..01cc4f7a46 100644 --- a/libavformat/asf.h +++ b/libavformat/asf.h @@ -104,6 +104,16 @@ extern const ff_asf_guid ff_asf_mutex_language; extern const AVMetadataConv ff_asf_metadata_conv[]; +/** + * Handles both attached pictures as well as id3 tags. + * + * @return Returns < 0 on error, 1 if the type of the byte array + * is unsupported by this function and 0 otherwise. + */ +int ff_asf_handle_byte_array(AVFormatContext *s, const char *name, + int val_len); + + #define ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT 0x80 //1000 0000 -- cgit v1.2.3