<HTML><BODY><div><div>I found that the warning occurs here v4l2.c</div><div>But what can I do to prevent the function avformat_find_stream_info from calling this message?</div><div> </div><div><div><div>static int v4l2_read_close(AVFormatContext *ctx)</div><div>{</div><div>    struct video_data *s = ctx->priv_data;</div></div><div> </div><div><div>    if (atomic_load(&s->buffers_queued) != s->buffers)</div><div>        av_log(ctx, AV_LOG_WARNING, "Some buffers are still owned by the caller on "</div><div>               "close.\n");</div></div><div> </div><div><div>    mmap_close(s);</div></div><div> </div><div><div>    v4l2_close(s->fd);</div><div>    return 0;</div><div>}</div></div></div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16678198801860844026_BODY"><div class="cl_930514"><div>If a function</div><div><div>>avformat_find_stream_info(pFmtCtxInp, NULL)</div><div> </div><div>is called for a variable</div></div><div>>AVFormatContext * pFmtCtxInp = avformat_alloc_context()</div><div> </div><div>then I get an error when releasing it</div><div>>avformat_close_input(&pFmtCtxInp)</div><div> </div><div><div><div>[video4linux2,v4l2 @ 0x14e17b0] Some buffers are still owned by the caller on close.</div><div>ioctl(VIDIOC_QBUF): Bad file descriptor</div><div> </div><div>But if I read the package from the pointer pFmtCtxInp, there is no error.</div><div>How to release correctly?</div></div></div></div></div><div>_______________________________________________<br>Libav-user mailing list<br><a href="/compose?To=Libav%2duser@ffmpeg.org">Libav-user@ffmpeg.org</a><br><a href="https://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br><br>To unsubscribe, visit link above, or email<br><a href="/compose?To=libav%2duser%2drequest@ffmpeg.org">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</div></div></div></div></blockquote> <div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br><span style="color: rgb(44, 45, 46);font-family: Arial, Tahoma, Verdana, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;">С уважением, </span>Александр А</div></div></div><div> </div></div></BODY></HTML>