avformat/async: fix assertion condition when draining buffer

Fixes some random assertion failures with

ffprobe -show_packets async:samples/ffmpeg-bugs/trac/ticket6132/Samsung_HDR_-_Chasing_the_Light.ts > /dev/null

Signed-off-by: Marton Balint <cus@passwd.hu>
pull/307/head
Marton Balint 6 years ago
parent 56c58b99d0
commit 4b46d1ee46
  1. 2
      libavformat/async.c

@ -142,7 +142,7 @@ static int ring_size_of_read_back(RingBuffer *ring)
static int ring_drain(RingBuffer *ring, int offset) static int ring_drain(RingBuffer *ring, int offset)
{ {
av_assert2(offset >= -ring_size_of_read_back(ring)); av_assert2(offset >= -ring_size_of_read_back(ring));
av_assert2(offset <= -ring_size(ring)); av_assert2(offset <= ring_size(ring));
ring->read_pos += offset; ring->read_pos += offset;
return 0; return 0;
} }

Loading…
Cancel
Save