summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-10-25 15:50:30 +0100
committerAnton Khirnov <anton@khirnov.net>2020-10-28 13:58:29 +0100
commitf95d9510ff50ab76f310f4ad2e6471e11275b2ff (patch)
tree60d8ff7469d1ef6885889f87eb4969a6925663c8 /libavformat
parent201b1246e23671d54287234b525f58bef900baef (diff)
avformat: add a stream event flag for new packets
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h6
-rw-r--r--libavformat/utils.c2
-rw-r--r--libavformat/version.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 3ad92a06e7..6aa7c310f7 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -995,6 +995,12 @@ typedef struct AVStream {
* it into the file
*/
#define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001
+/**
+ * - demuxing: new packets for this stream were read from the file. This
+ * event is informational only and does not guarantee that new packets
+ * for this stream will necessarily be returned from av_read_frame().
+ */
+#define AVSTREAM_EVENT_FLAG_NEW_PACKETS (1 << 1)
/**
* Real base framerate of the stream.
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e8335a601f..be275971d0 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1533,6 +1533,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
ret = 0;
st = s->streams[pkt->stream_index];
+ st->event_flags |= AVSTREAM_EVENT_FLAG_NEW_PACKETS;
+
/* update context if required */
if (st->internal->need_context_update) {
if (avcodec_is_open(st->internal->avctx)) {
diff --git a/libavformat/version.h b/libavformat/version.h
index 7853068649..ddcca9ae50 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -32,7 +32,7 @@
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 58
-#define LIBAVFORMAT_VERSION_MINOR 63
+#define LIBAVFORMAT_VERSION_MINOR 64
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \