static void reset_packet(AVPacket *pkt)
{
    av_init_packet(pkt);
    pkt->data = NULL;
}

The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.