提交 7ba790bf 编写于 作者: Z Zhang Rui

ios/VideoToolbox: fix bad access in idr check

上级 7b28615d
......@@ -299,7 +299,7 @@ static bool ff_avpacket_is_idr(const AVPacket* pkt) {
if (pkt->data && pkt->size >= 5) {
int offset = 0;
while (offset + 5 <= pkt->size) {
while (offset > 0 && offset + 5 <= pkt->size) {
void* nal_start = pkt->data+offset;
state = ff_get_nal_units_type(nal_start);
if (state == NAL_IDR_SLICE) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册