X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fasync.c;h=a0bdfa2ee3ae69840b516383bf4a27a0fd892295;hb=ebf4bc629e6d0dbb4bb6725849bdd06456e4c8af;hp=54dbd2312a24c079bca695dae20cc2e28493faf4;hpb=a12063b118ad05409ff775ba30fab00265ad3031;p=ffmpeg diff --git a/libavformat/async.c b/libavformat/async.c index 54dbd2312a2..a0bdfa2ee3a 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; } @@ -293,7 +293,7 @@ cond_wakeup_background_fail: cond_wakeup_main_fail: pthread_mutex_destroy(&c->mutex); mutex_fail: - ffurl_close(c->inner); + ffurl_closep(&c->inner); url_fail: ring_destroy(&c->ring); fifo_fail: @@ -317,7 +317,7 @@ static int async_close(URLContext *h) pthread_cond_destroy(&c->cond_wakeup_background); pthread_cond_destroy(&c->cond_wakeup_main); pthread_mutex_destroy(&c->mutex); - ffurl_close(c->inner); + ffurl_closep(&c->inner); ring_destroy(&c->ring); return 0;