]> git.sesse.net Git - ffmpeg/commitdiff
avformat: add a stream event flag for new packets
authorAnton Khirnov <anton@khirnov.net>
Sun, 25 Oct 2020 14:50:30 +0000 (15:50 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 28 Oct 2020 12:58:29 +0000 (13:58 +0100)
doc/APIchanges
libavformat/avformat.h
libavformat/utils.c
libavformat/version.h

index f2830968bbb8b4ea37647f1f02ccc64eef9b7ee2..c00f103babdc291f615e6cd57c75d9e2df1621ea 100644 (file)
@@ -15,6 +15,9 @@ libavutil:     2017-10-21
 
 API changes, most recent first:
 
+2020-xx-xx - xxxxxxxxxx - lavf 58.64.100 - avformat.h
+  Add AVSTREAM_EVENT_FLAG_NEW_PACKETS.
+
 2020-xx-xx - xxxxxxxxxx - lavu 56.60.100 - buffer.h
   Add a av_buffer_replace() convenience function.
 
index 3ad92a06e769c29848b876b4601f889cc4ec9ede..6aa7c310f7eb3a321fa1da6eabea6aae9c158afb 100644 (file)
@@ -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.
index e8335a601fee5077ae09f447176f5bbd3aa2928e..be275971d0a301efc797c525bb36e8e80b9948a3 100644 (file)
@@ -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)) {
index 7853068649aab3026d70779f1fd57a2a03f8abc9..ddcca9ae5092a893f97a962693742a7a245af9e8 100644 (file)
@@ -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, \