summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-11-21 10:24:48 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-11-21 10:24:48 +0000
commit6bfc26830524ca1e5d7fd54e32ea0ffdbcdd25f5 (patch)
tree89a07b54a151b4b7b7e95056ae5de838afc55923 /libavformat/avformat.h
parenta08d918e680266f66f85ddaf232946f7147b74a8 (diff)
downloadffmpeg-6bfc26830524ca1e5d7fd54e32ea0ffdbcdd25f5.tar.gz
Add av_append_packet function, to be used in code that merges packets
to allow palette handling without using PaletteControl. Originally committed as revision 25777 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index a9cf174af9..517d1ac152 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -22,7 +22,7 @@
#define AVFORMAT_AVFORMAT_H
#define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 84
+#define LIBAVFORMAT_VERSION_MINOR 85
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -245,6 +245,21 @@ void av_metadata_free(AVMetadata **m);
int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size);
+/**
+ * Reads data and appends it to the current content of the AVPacket.
+ * If pkt->size is 0 it behaves like av_get_packet.
+ * Note that this uses av_grow_packet and thus involves a realloc
+ * which is inefficient. Thus this function should only be used
+ * when there is no reasonable way to know (an upper bound of)
+ * the final size.
+ *
+ * @param pkt packet
+ * @param size amount of data to read
+ * @return >0 (read size) if OK, AVERROR_xxx otherwise, previous data
+ * will not be lost even if an error occurs.
+ */
+int av_append_packet(ByteIOContext *s, AVPacket *pkt, int size);
+
/*************************************************/
/* fractional numbers for exact pts handling */