* for short periods that are guaranteed not to overlap
* with calls to av_read_frame() (or ff_read_packet())
* or with each other.
+ * It may be used by demuxers as a replacement for
+ * stack packets (unless they call one of the aforementioned
+ * functions with their own AVFormatContext).
* Every user has to ensure that this packet is blank
* after using it.
*/
*
* @return AVChapter or NULL on error
*/
-#if FF_API_CHAPTER_ID_INT
-AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base,
-#else
AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base,
-#endif
int64_t start, int64_t end, const char *title);
/**
*/
int ff_read_packet(AVFormatContext *s, AVPacket *pkt);
+/**
+ * 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);
+
/**
* Interleave an AVPacket per dts so it can be muxed.
*