@@ -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;
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)