[FFmpeg-cvslog] avformat/async: fix assertion condition when draining buffer

Marton Balint git at videolan.org
Mon Feb 11 23:16:42 EET 2019


ffmpeg | branch: release/4.1 | Marton Balint <cus at passwd.hu> | Sun Jan 27 19:48:12 2019 +0100| [110eff79caf41a1c0ba9f35f5d46d91f8097be5f] | committer: Marton Balint

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 at passwd.hu>
(cherry picked from commit 4b46d1ee463f6bb2d2be967d418d275a44fe2a9c)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=110eff79caf41a1c0ba9f35f5d46d91f8097be5f
---

 libavformat/async.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/async.c b/libavformat/async.c
index 54dbd2312a..4e295b5e10 100644
--- a/libavformat/async.c
+++ b/libavformat/async.c
@@ -142,7 +142,7 @@ static int ring_size_of_read_back(RingBuffer *ring)
 static int ring_drain(RingBuffer *ring, int offset)
 {
     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;
     return 0;
 }



More information about the ffmpeg-cvslog mailing list