avformat: add a stream event flag for new packets

This commit is contained in:
Anton Khirnov
2020-10-25 15:50:30 +01:00
parent 201b1246e2
commit f95d9510ff
4 changed files with 12 additions and 1 deletions

View 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)) {