[Libav-user] Some buffers are still owned by the caller on close

wolverin wolverin82 at mail.ru
Tue Nov 8 06:53:14 EET 2022


I found that the warning occurs here v4l2.c
But what can I do to prevent the function avformat_find_stream_info from calling this message?
 
static int v4l2_read_close(AVFormatContext *ctx)
{
    struct video_data *s = ctx->priv_data;
 
    if (atomic_load(&s->buffers_queued) != s->buffers)
        av_log(ctx, AV_LOG_WARNING, "Some buffers are still owned by the caller on "
               "close.\n");
 
    mmap_close(s);
 
    v4l2_close(s->fd);
    return 0;
}
>If a function
>>avformat_find_stream_info(pFmtCtxInp, NULL)
> 
>is called for a variable
>>AVFormatContext * pFmtCtxInp = avformat_alloc_context()
> 
>then I get an error when releasing it
>>avformat_close_input(&pFmtCtxInp)
> 
>[video4linux2,v4l2 @ 0x14e17b0] Some buffers are still owned by the caller on close.
>ioctl(VIDIOC_QBUF): Bad file descriptor
> 
>But if I read the package from the pointer pFmtCtxInp, there is no error.
>How to release correctly?
>_______________________________________________
>Libav-user mailing list
>Libav-user at ffmpeg.org
>https://ffmpeg.org/mailman/listinfo/libav-user
>
>To unsubscribe, visit link above, or email
>libav-user-request at ffmpeg.org with subject "unsubscribe". 
 
 
--
С уважением,  Александр А
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20221108/6a5bf32e/attachment.htm>


More information about the Libav-user mailing list