check av_get_packet return value