avcodec/avpacket: simplify freeing pkt->data