summaryrefslogtreecommitdiff
path: root/libavformat/demux.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-06 20:53:12 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-10 07:42:22 +0200
commit92a43ad3842b8422dd0e88cfd66cf0f284e5015a (patch)
tree994bd0d8d5f3ca073603f603c93e3b30ce52a793 /libavformat/demux.h
parent3c3c13e67b72d9c4e0615e744ef2c1cdf8b2701e (diff)
downloadffmpeg-92a43ad3842b8422dd0e88cfd66cf0f284e5015a.tar.gz
avformat/utils: Move ff_add_attached_pic to demux_utils.c
It is demuxer-only: It potentially adds an AVStream and it sets AVStream.attached_pic. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/demux.h')
-rw-r--r--libavformat/demux.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavformat/demux.h b/libavformat/demux.h
index d857e4dafb..546569ae6a 100644
--- a/libavformat/demux.h
+++ b/libavformat/demux.h
@@ -187,4 +187,20 @@ void avpriv_stream_set_need_parsing(AVStream *st, enum AVStreamParseType type);
AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base,
int64_t start, int64_t end, const char *title);
+/**
+ * Add an attached pic to an AVStream.
+ *
+ * @param st if set, the stream to add the attached pic to;
+ * if unset, a new stream will be added to s.
+ * @param pb AVIOContext to read data from if buf is unset.
+ * @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);
+
#endif /* AVFORMAT_DEMUX_H */