[FFmpeg-devel] [PATCH] avformat/utils: Simplify condition in av_read_frame()
Michael Niedermayer
michael at niedermayer.cc
Wed Nov 27 16:24:55 EET 2019
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 8196442dd1..dc79987ec1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1830,8 +1830,8 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
/* read packet from packet buffer, if there is data */
st = s->streams[next_pkt->stream_index];
- if (!(next_pkt->pts == AV_NOPTS_VALUE && st->discard < AVDISCARD_ALL &&
- next_pkt->dts != AV_NOPTS_VALUE && !eof)) {
+ if (next_pkt->pts != AV_NOPTS_VALUE || st->discard >= AVDISCARD_ALL ||
+ next_pkt->dts == AV_NOPTS_VALUE || eof) {
ret = ff_packet_list_get(&s->internal->packet_buffer,
&s->internal->packet_buffer_end, pkt);
goto return_packet;
--
2.23.0
More information about the ffmpeg-devel
mailing list