我正在尝试使用带有 Qt 的 libav 库来解码 h.264 UDP 视频流,但是当我使用 avformat_open_file 时,我收到以下错误消息:
[udp @ 0x102b5bee0] Part of datagram lost due to insufficient buffer size
该消息出现大约 10 次,然后尝试失败。我正在尝试同时解码 4 个不同的 UDP 流,每个流的帧速率为 25fps。Wireshark 表示数据包在 3000 到 10000 字节之间。
这是我对 avformat_open_input 的调用:
avformat_open_input(&formatContext, udpUrl.toStdString().c_str(), NULL, NULL)
在进行此调用时,formatContext 为 NULL,并且 udpUrl 的格式为“udp://ipaddress:port”。
如果有人能为我阐明这个问题,将不胜感激!