0
根据文档:here,avcodec_decode_video2
如果没有帧可以被解压缩,则返回0。如果没有帧可以解压,got_picture_ptr
也应该设置为零。当got_picture_ptr为0时,avcodec_decode_video2返回正数
我在h264视频中运行此功能,并且我得到了正返回值,而got_picture_ptr
设置为0.也许文档没有更新?
根据文档:here,avcodec_decode_video2
如果没有帧可以被解压缩,则返回0。如果没有帧可以解压,got_picture_ptr
也应该设置为零。当got_picture_ptr为0时,avcodec_decode_video2返回正数
我在h264视频中运行此功能,并且我得到了正返回值,而got_picture_ptr
设置为0.也许文档没有更新?
你指着不说,它应该返回0它读取On error a negative value is returned, otherwise the number of bytes used or zero if no frame could be decompressed.
这落入number of bytes used
类别的文档。仅仅因为使用了字节,并不意味着一个框架已经准备就绪。例如B帧出现故障。这意味着它已被解码,但可以被渲染,直到更多解码。