<HTML><BODY><div> </div><div>Hello</div><div> </div><ol><li>Why does avformat_open_input reset pInpDic or how to specify AVDictionary correctly?</li></ol><div>const AVInputFormat * pInpFmt = av_find_input_format("v4l2");</div><div><div><div>AVDictionary * pInpDic = NULL</div></div></div><div><div>av_dict_set(&pInpDic, "pixel_format", format, 0);</div><div>av_dict_set(&pInpDic, "video_size", size, 0);</div><div>av_dict_set(&pInpDic, "framerate", rate, 0);</div><div>avformat_open_input(&pInpFmtCtx, device, pInpFmt, &pInpDic)</div><div> </div><ol start="2"><li>If after executing avformat_find_stream_info to release resources, I get an error</li></ol><div>avformat_find_stream_info(pInpFmtCtx, NULL)</div><div><div><div> </div><div>if (pInpDic) av_dict_free(&pInpDic);</div><div>here ---ยป if (pInpFmtCtx) avformat_close_input(&pInpFmtCtx);</div></div><div> </div><div><div><div>video4linux2,v4l2 @ 0x14dcf10] Some buffers are still owned by the caller on close.</div><div>ioctl(VIDIOC_QBUF): Bad file descriptor</div></div></div></div><div> </div></div></BODY></HTML>