FFmpeg avcodec_send_packet 报错err:Resource temporarily unavailable
时间: 2023-03-19 16:25:22 浏览: 605
The "Resource temporarily unavailable" error in FFmpeg's `avcodec_send_packet()` function typically indicates that the codec's internal buffers are full and cannot accept more data at the moment.
To resolve this issue, you can try one or more of the following steps:
1. Check if you are sending packets too quickly to the codec. If you are sending packets at a high rate, the codec may not be able to keep up and may return this error. You can try slowing down the rate at which you are sending packets to the codec.
2. Increase the size of the codec's internal buffers. This can be done by setting the appropriate parameters in the codec context before initializing the codec.
3. Check if the packet data is valid and correctly formatted. If the data is corrupted or not in the expected format, the codec may reject the packet and return this error.
4. Try flushing the codec's buffers by sending a NULL packet to the codec using `avcodec_send_packet()`. This can be useful if the codec's internal buffers are stuck in a state where they cannot accept any more data.
If none of these steps resolve the issue, there may be other underlying issues with your code or system configuration that are causing the error. In that case, you may need to seek further assistance or debugging support.
阅读全文