History

avformat: add a stream event flag for new packets

Anton Khirnov committed 6 years ago

Commit f95d9511 parent 201b1244 files · +12 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavformat/avformat.h +6 −0
  3. libavformat/utils.c +2 −0
  4. libavformat/version.h +1 −1
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2017-10-21 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2020-xx-xx - xxxxxxxxxx - lavf 58.64.100 - avformat.h
19+ Add AVSTREAM_EVENT_FLAG_NEW_PACKETS.
20+
1821 2020-xx-xx - xxxxxxxxxx - lavu 56.60.100 - buffer.h
1922 Add a av_buffer_replace() convenience function.
2023
libavformat/avformat.h+6−0
@@ -995,6 +995,12 @@ typedef struct AVStream { · 994 unmodified lines
995995 * it into the file
996996 */
997997 #define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001
998+/**
999+ * - demuxing: new packets for this stream were read from the file. This
1000+ * event is informational only and does not guarantee that new packets
1001+ * for this stream will necessarily be returned from av_read_frame().
1002+ */
1003+#define AVSTREAM_EVENT_FLAG_NEW_PACKETS (1 << 1)
9981004
9991005 /**
10001006 * Real base framerate of the stream.
libavformat/utils.c+2−0
@@ -1533,6 +1533,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) · 1532 unmodified lines
15331533 ret = 0;
15341534 st = s->streams[pkt->stream_index];
15351535
1536+ st->event_flags |= AVSTREAM_EVENT_FLAG_NEW_PACKETS;
1537+
15361538 /* update context if required */
15371539 if (st->internal->need_context_update) {
15381540 if (avcodec_is_open(st->internal->avctx)) {
libavformat/version.h+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
3232 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
3333 // Also please add any ticket numbers that you believe might be affected here
3434 #define LIBAVFORMAT_VERSION_MAJOR 58
35−#define LIBAVFORMAT_VERSION_MINOR 63
35+#define LIBAVFORMAT_VERSION_MINOR 64
3636 #define LIBAVFORMAT_VERSION_MICRO 100
3737
3838 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t