简体   繁体   English

FFmpeg av_read_frame和最大数据包大小

[英]FFmpeg av_read_frame and maximum packet size

是否有可能检测到av_read_frame()可以读取的最大数据包(AVpacket)大小?

I was looking for the same recently. 我最近也在寻找同样的东西。 It appears that av_read_frame internally calls a codec specific read_packet function for each codec/format. 似乎av_read_frame在内部为每个编解码器/格式调用特定于编解码器的read_packet函数。 This in turns allocate memory per packet and frees it depending on the maximum limits that the codec/format poses. 这反过来为每个数据包分配内存并释放它,具体取决于编解码器/格式构成的最大限制。 So as long as you have memory to support the (in)valid stream you should be fine and the limits are specific to the codec/format decoders. 因此,只要您有内存来支持(in)有效流,您应该没问题,并且限制是特定于编解码器/格式解码器的。 [YOu can find the function defined in AVInputFormat for each format as .read_packet ]. [你可以在每个格式的AVInputFormat中找到为.read_packet定义的函数]。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM